For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

Forwarding of the Disconnect RADIUS requests

Besides forwarding the RADIUS Authorization and Accounting requests, RADIUS Proxy (RPR) also supports forwarding of the RADIUS CoA and DisconnectOpens in a new tab requests.

You can configure RADIUS CoA and Disconnect servers and relays using these configuration options:

  • coa.listen - the RADIUS server listener address.

  • coa.port - the RADIUS server listener port. Only a single value is supported. It is recommended to use port 3799 for RADIUS CoA and Disconnect requests.

  • coa.sources - the list of sources from which the given RADIUS server is allowed to accept incoming RADIUS CoA and Disconnect messages. Each source must provide a RADIUS secret, the source address or range of addresses in the address/mask format, and the optional nas_id. The logic of handling the CoA sources configuration is the same as in Forwarding of the AAA RADIUS requests.

  • coa.allow_attrs - the list of RADIUS attributes to preserve in the forwarded request. If the list is empty, RADIUS Proxy preserves all attributes. If the list is not empty, only the given RADIUS attributes are preserved in the forwarded request.

  • coa.remove_attrs - the list of RADIUS attributes removed from all incoming RADIUS CoA and Disconnect requests.

  • coa.route_attr - the name of the RADIUS attribute used by RADIUS Proxy to determine where to forward incoming CoA and Disconnect requests.

  • coa.relays - the list of RADIUS relays where RADIUS Proxy forwards the incoming RADIUS requests. Each relay must have an address and a RADIUS secret specified. The address is used by RADIUS Proxy to forward incoming messages. The secret must match the secret of the side where the message is forwarded. If instead of an IP address, the FQDN name is provided in the relay configuration and it resolves to multiple IP addresses, RPR distributes requests to all of them in a random order.

    Caution

    If the FQDN name can not be resolved, RPR prints an error about it during start-up and exits.

    To determine where to forward the given RADIUS request, RADIUS Proxy uses the value of the coa.route_attr configuration option. When a RADIUS request arrives at RADIUS Proxy, it fetches the value of the RADIUS attribute specified in the coa.route_attr configuration option. If the attribute value matches the value given in one of coa.relays.{RELAY}.route_attr, the message is forwarded to that relay. If there is no suitable relay found, the default relay is used. The default relay is the relay that does not contain the optional coa.relays.{RELAY}.route_attr configuration option. If the default relay is not specified in the configuration, and no suitable relays to forward the RADIUS CoA or Disconnect request, RPR answers with the CoA-NAK or Disconnect-NAK respectively.

  • coa.relays.{RELAY}.timeout - the number of milliseconds RADIUS Proxy waits for the response. If not specified in the configuration, the default value of 5000 is used.

  • coa.relays.{RELAY}.retries - the number of re-tries to send a RADIUS request failed by timeout to the given RADIUS relay. If not specified, the default value of 3 is used. If the number of retries for a primary RADIUS server is exhausted, the failover RADIUS servers are used. Only after that, the client returns a response or an error. For more information, see the RADIUS servers for failover scenarios document.

  • coa.relays.{RELAY}.failover_server_pool - the name of a pool of secondary RADIUS servers used for failover scenarios. For more information, see the RADIUS servers for failover scenarios document.

In the next section, you can see a configuration example that may help you understand these configuration options.

Configuration example for forwarding of the RADIUS Disconnect requests

This section provides a configuration example of RADIUS Proxy that accepts the incoming RADIUS CoA and Disconnect messages from one side and forwards them to another side.

Look at the example of the RADIUS Proxy configuration:

yaml

In the example above, there is a definition of a single RADIUS server which listens for incoming RADIUS requests at the 0.0.0.0 address and 3799 port.

According to the coa.sources[].source configuration, the RADIUS server may accept the incoming RADIUS requests only from the 172.2.1.1 address. All such requests must have a secret value ocs-1-secret. If the incoming request arrives at this RADIUS server with a different source address or its secret does not match, such a request is silently dropped.

After RADIUS Proxy receives the incoming RADIUS request and it is allowed according to the coa.sources configuration, the message is forwarded to one of the specified relays.

All of the incoming RADIUS requests are forwarded to one of two possible relays:

  • radius-server-1:3799
  • radius-server-2:3799

Note

All the hostnames in the example above must be valid and resolvable to the IP address(es).

The server where RADIUS Proxy forwards the given incoming RADIUS request depends on the attributes located in the request. In the example above, coa.route_attr is configured with NAS-IP-Address. RADIUS Proxy checks the value of this attribute for each incoming RADIUS request. If the value of NAS-IP-Address is 200.201.202.204 like in the first relay, the request is forwarded to radius-server-1:3799. Otherwise, the default relay radius-server-2:3799 is used. To communicate with the remote RADIUS server, RADIUS Proxy uses a secret defined in the relay where the message is sent.

The list of allowed RADIUS attributes (allow_attrs) is not empty, so only these attributes are preserved in the outgoing RADIUS messages:

  • NAS-IP-Address
  • Acct-Session-Id
  • Framed-IP-Address

This diagram shows the possible flow of RADIUS requests based on the configuration example described above: