Hello, I have recently setup FreeRadius on a test machine and loaded (via a dictionary file) the VSA's for a NAS in our network. The Radius messages we are receiving are purely accounting messages. I am trying to accomplish the following: I would like to forward accounting messages to another Radius server based upon the value of one of the VSA's. In addition, I would like to pick certain attribute-value pairs to forward while discarding the others. I really appreciate any help and I should probably mention that I am pretty new to radius (yesterday was my first time installing it. :) Thanks, DB -- View this message in context: http://freeradius.1045715.n5.nabble.com/Accounting-Forwarding-tp4807387p4807... Sent from the FreeRadius - User mailing list archive at Nabble.com.
dbeutler wrote:
I have recently setup FreeRadius on a test machine and loaded (via a dictionary file) the VSA's for a NAS in our network. The Radius messages we are receiving are purely accounting messages. I am trying to accomplish the following: I would like to forward accounting messages to another Radius server based upon the value of one of the VSA's.
$ man unlang preacct { ... if (Attribute-Name == "foo") { update control { Proxy-To-Realm := "bar.com" } } ... } You'll have to define the realm. See raddb/proxy.conf.
In addition, I would like to pick certain attribute-value pairs to forward while discarding the others.
$ man unlang See "-=". Or, the "attr_filter" module.
I really appreciate any help and I should probably mention that I am pretty new to radius (yesterday was my first time installing it. :)
It's dead easy. :) Alan DeKok.
I thought I would first work on setting up the proxy and then focus on the picking of certain attribute pairs to forward. I put the following in the proxy.conf file: realm fakecompany.com { type = radius authhost = 192.41.31.4:1812 accthost = 192.41.31.4:1813 secret = testing123 } I put the following in the radiusd.conf file in the preacct section (this may be the wrong place but was the only area that I saw a preacct section): if (NAS-Port == "5060") { update control { Proxy-To-Realm := "fakecompany.com" } } For context, the whole preacct section of the radiusd.conf file looks like the following: preacct { preprocess # # Ensure that we have a semi-unique identifier for every # request, and many NAS boxes are broken. acct_unique if (NAS-Port == "5060") { update control { Proxy-To-Realm := "fakecompany.com" } } # # Look for IPASS-style 'realm/', and if not found, look for # '@realm', and decide whether or not to proxy, based on # that. # # Accounting requests are generally proxied to the same # home server as authentication requests. # IPASS suffix # ntdomain # # Read the 'acct_users' file files } When I run in debug mode, I get the following: Starting - reading configuration files ... reread_config: reading radiusd.conf Config: including file: ../etc/raddb/proxy.conf Config: including file: ../etc/raddb/clients.conf Config: including file: ../etc/raddb/snmp.conf Config: including file: ../etc/raddb/eap.conf Config: including file: ../etc/raddb/sql.conf ../etc/raddb/radiusd.conf[1970]: Line is not in 'attribute = value' format Errors reading radiusd.conf Thanks, Danny -- View this message in context: http://freeradius.1045715.n5.nabble.com/Accounting-Forwarding-tp4807387p4808... Sent from the FreeRadius - User mailing list archive at Nabble.com.
dbeutler wrote:
When I run in debug mode, I get the following: Starting - reading configuration files ... reread_config: reading radiusd.conf Config: including file: ../etc/raddb/proxy.conf Config: including file: ../etc/raddb/clients.conf Config: including file: ../etc/raddb/snmp.conf Config: including file: ../etc/raddb/eap.conf Config: including file: ../etc/raddb/sql.conf ../etc/raddb/radiusd.conf[1970]: Line is not in 'attribute = value' format Errors reading radiusd.conf
And.... what is one line 1970 of radiusd.conf? And if the "preacct" section is in radiusd.conf, odds are you're running 1.1.x, which doesn't support "unlang" logic. Upgrade. Alan DeKok.
participants (2)
-
Alan DeKok -
dbeutler