You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume that there're two captive portals on an OPNsense box e.g. CP1 and CP2 (this applies to every setup with more than one CP). In RADIUS terminology, the CP's IP address is the NAS IP address. Furthermore, CP1 and CP2 are completely different access services. However, RADIUS access requests...
have the same NAS-Identifier for both CP1 and CP2,
are sent to the configured RADIUS server using the OPNsense box's IP address that's points towards the RADIUS server and not with the IP address of either CP1 or CP2 (depending on where the client connects).
This means that RADIUS Access-Request packets of CP1 and CP2 are indistinguishable. This poses operational problems when using RADIUS servers because authorisation and authentication policies may differ.
To Reproduce
Steps to reproduce the behavior:
Set up a RADIUS server.
Set up two captive portals CP1 and CP2 with RADIUS auth.
Connect a client to CP1 and CP2
Collect the Access-Request packets on the RADIUS server.
Expected behavior
The expected behaviour is...
that the CP's gateway IP address is used to send Access-Request and Accounting packets (optional),
the NAS-Identifier attribute is unique for each CP on the same OPNsense machine (mandatory).
This should be overridden when authenticating from a Captive Portal. For CPn it could be set to something like "Captive-Portal-n". Is it possible to override the nasIdentifier after the following line?
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
Assume that there're two captive portals on an OPNsense box e.g. CP1 and CP2 (this applies to every setup with more than one CP). In RADIUS terminology, the CP's IP address is the NAS IP address. Furthermore, CP1 and CP2 are completely different access services. However, RADIUS access requests...
This means that RADIUS Access-Request packets of CP1 and CP2 are indistinguishable. This poses operational problems when using RADIUS servers because authorisation and authentication policies may differ.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The expected behaviour is...
Describe alternatives you considered
There're currently no alternatives.
Screenshots
N/A
Relevant log files
N/A
Additional context
The NAS identifier is set here:
core/src/opnsense/mvc/app/library/OPNsense/Auth/Radius.php
Lines 125 to 155 in 1850661
This should be overridden when authenticating from a Captive Portal. For CPn it could be set to something like "Captive-Portal-n". Is it possible to override the nasIdentifier after the following line?
core/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/AccessController.php
Line 147 in 1850661
The variable
$zoneid
is properly set in the above function which would help to override the nasIdentifier.Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 24.7.11_2-amd64
FreeBSD 14.1-RELEASE-p6
OpenSSL 3.0.15
The text was updated successfully, but these errors were encountered: