not logged in | [Login]
Always use radiusd -X
when debugging!
It is possible to use FreeRADIUS as a proxy RADIUS server. This means that it can consult a remote RADIUS server to validate a user. This is handy for roaming setups, or for renting ports to someone else.
This article is based on doc/proxy from the server distribution.
If a user logs in with a defined realm syntax, the "realm" portion is matched against the configuration to determine how the request should be handled. Common realm formats are:
username@realm realm/username username%realm realm\username
The realm parsing syntax is user definable via the realm module config - see mods-available/realm.
You can define multiple instances of the realm module to support multiple realm syntaxes at the same time. Be sure to pay close attention to the order that these instances are called from the virtual server configuration, as you may inadvertently get unexpected behaviour (by having a user use realm1/username@realm2 for instance). If you need to proxy to IPASS, it should be called first, because usernames will be in the form IPASS/username@realm and you want to proxy these users to IPASS, not to the realm behind the '@'.
The realms are configured in the file proxy.conf, which is included by radiusd.conf. The formats and sample configurations are included as comments. Realms in proxy.conf must be unique. It is possible to define a realm by regular expression; realms that directly match will be used in precedence to a realm matched by regex.
The realm DEFAULT matches all realms.
The realm NULL matches any requests WITHOUT a realm.
If you set the remote server to LOCAL, the request will be handled locally as usual, without sending it to a remote radius server.
There are several options you can add in both files:
The realms file is deprecated and should not be used anymore. Please convert your configuration to use the proxy.conf file. Do not use both the realms file and the proxy.conf file, as it will cause confusion.
All accounting data for proxied requests does NOT get stored in the standard logfiles, but in a separate directory. The name of this directory is the name of the remote radius server, and if you want you can define a nickname for it in /etc/raddb/naslist just as for normal NASes.
When your server proxies requests to another server, it acts as a NAS for the remote server. On the remote server, you need to add the hostname of your server and the same secret to clients.conf as well.
As you might not control the remote RADIUS server, you might want to control the attributes sent back by the remote server in an Access-Accept packet. Have a look at the attrs file for this!
The exact thing that happens is this:
Behind the scenes, the rlm_realm module is setting the Proxy-To-Realm control attribute to tell the server which realm to proxy to. If this attribute is set at the end of processing the authorize section, the server will initiate proxying the request (sending via the pre-proxy section), rather than authenticating locally.
Therefore it can sometimes be useful or easier to skip use of the realm module entirely, and control proxying only by unlang. For example to proxy all unknown realms you may use something like:
if ("%{User-Name}" =~ /@local\.domain\.example$/) { noop } else { update control { Proxy-To-Realm := 'offsite' } }
Then you may define a realm in proxy.conf:
realm offsite { auth_pool = offsite_pool ... }
Last edited by Matthew Newton (mcnewton), 2015-03-26 11:24:03
Sponsored by Network RADIUS