When you are using RADIUS, a user dials up or otherwise contacts some sort of server that is giving out connections. That server is a RADIUS client; it holds a dialog with the user and passes information back and forth to a RADIUS client. Remember that it is the terminal server that is the RADIUS client, not the remote machine. The remote machine won't be able to join the network until after the RADIUS dialog is complete. Figure 21-5 shows the pattern of connections involved in RADIUS.
This system makes life difficult for proxying and network address translation systems. The RADIUS server has a different secret for each client, and it uses the source IP address of the RADIUS packet to choose which secret to add to the data before hashing. Similarly, if a client can talk to more than one server, it will use the source IP address to choose the secret to put into the hash at its end. This means that there must be a reliable one-to-one mapping between source IP addresses and RADIUS speakers; you cannot put multiple clients or servers behind the same proxy, or the server will not be able to tell them apart. For the same reason, you cannot put clients or servers behind a network address translation system unless they are statically mapped so that they will always appear with the same distinct source address.
Direction | SourceAddr. | Dest.Addr. | Protocol | SourcePort | Dest.Port | ACKSet | Notes |
---|---|---|---|---|---|---|---|
In | Ext | Int | UDP | >1023 |
1812[139]
|
[140]
|
Authentication query, external client to internal RADIUS server |
Out | Int | Ext | UDP | 1812[139] | >1023 | [140] | Authentication response, internal RADIUS server to external client |
In | Ext | Int | UDP | >1023 |
1813[141]
|
[140] | Accounting notification, external client to internal RADIUS server |
Out | Int | Ext | UDP | 1813[141] | >1023 | [140] | Accounting response, internal RADIUS server to external client. |
Out | Int | Ext | UDP | >1023 | 1812[139] | [140] | Authentication query, internal client to external RADIUS server |
In | Ext | Int | UDP | 1812[139] | >1023 | [140] | Authentication response, external RADIUS server to internal client |
Out | Int | Ext | UDP | >1023 | 1813[141] | [140] | Accounting notification, internal client to external RADIUS server |
In | Ext | Int | UDP | 1813[141] | >1023 | [140] | Accounting response, external RADIUS server to internal client. |
[139]Early implementations may use 1645.
[140]UDP has no ACK equivalent.
[141]Early implementations may use 1646.
As we discussed earlier, the way that RADIUS authenticates clients and servers means that RADIUS will not work straightforwardly through generic proxy systems. RADIUS servers that do proxying do not pass the original authentication through; instead, the client and the proxy server authenticate each other, and then the proxy server recalculates the authenticator and separately authenticates to the next server. A generic proxy system cannot do this; if you need to proxy RADIUS, you should use a dedicated RADIUS proxy server.