Skip to content

Added NAS-IP-Address attribute to radius access server calls#10089

Closed
metmayhem wants to merge 3 commits into
opnsense:masterfrom
metmayhem:feature/Add-Radius-NAS-IP-Address
Closed

Added NAS-IP-Address attribute to radius access server calls#10089
metmayhem wants to merge 3 commits into
opnsense:masterfrom
metmayhem:feature/Add-Radius-NAS-IP-Address

Conversation

@metmayhem
Copy link
Copy Markdown

Added NAS-IP-Address attribute to radius access server calls
Changed NAS-Port-Type to virtual for radius access server calls

No open issues I could find regarding this, but I needed NAS-IP-Address to be set for Microsoft NPS to work. I also found that the NAS-Port-Type was hard coded to RADIUS_ETHERNET which didn't work with NPS either. I changed it to be hard coded RADIUS_VIRTUAL for access servers and kept the default of RADIUS_ETHERNET for everything else.

Changed NAS-Port-Type to virtual for radius access server calls
@AdSchellevis AdSchellevis self-assigned this Apr 5, 2026
Copy link
Copy Markdown
Member

@AdSchellevis AdSchellevis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@metmayhem it needs some modifications to ease future maintenance, but adding the field shouldn't be an issue.

Comment thread src/opnsense/mvc/app/library/OPNsense/Auth/Radius.php Outdated
Comment thread src/www/system_authservers.php Outdated
…in PR comment

Made RADIUS_NAS_PORT_TYPE hard-coded to RADIUS_VIRTUAL as suggested in PR comment
Added dropdown of available interface IPs for NAS-IP-Address
Copy link
Copy Markdown
Author

@metmayhem metmayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes have been made. Also changed NAS IP Address field to a dropdown that contains all available interface IPs.

Comment thread src/opnsense/mvc/app/library/OPNsense/Auth/Radius.php Outdated
Comment thread src/www/system_authservers.php Outdated
@metmayhem metmayhem requested a review from AdSchellevis April 6, 2026 16:21
*/

namespace OPNsense\Auth;
require_once("interfaces.inc");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not allowed to insert legacy files inside new MVC based code, but I also don't think we need it to be honest. If we just validate the input for validity, we don't have to select a static list of addresses (and make sure the user can also use virtual addresses as well).

I'll have a look at the code and see if I can fix the concerns.

@AdSchellevis
Copy link
Copy Markdown
Member

@metmayhem can you try 95483e5 ? It should implement what you need.

@metmayhem
Copy link
Copy Markdown
Author

It looks to be working. I did kind of like my addition of the dropdown (prevents human error during setup), but this gets the job done. Thanks

fichtner pushed a commit that referenced this pull request Apr 22, 2026
PR: #10089

(cherry picked from commit 95483e5)
(cherry picked from commit dd226f3)
fichtner pushed a commit that referenced this pull request Apr 22, 2026
PR: #10089

(cherry picked from commit 95483e5)
(cherry picked from commit dd226f3)
fichtner pushed a commit that referenced this pull request Apr 22, 2026
PR: #10089

(cherry picked from commit 95483e5)
(cherry picked from commit dd226f3)
fichtner pushed a commit that referenced this pull request Apr 23, 2026
PR: #10089

(cherry picked from commit 95483e5)
(cherry picked from commit dd226f3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants