OPNsense Forum

English Forums => General Discussion => Topic started by: stif on September 24, 2023, 01:00:31 PM

Title: Dynamic VLAN assignment via MAC Address
Post by: stif on September 24, 2023, 01:00:31 PM
Hi folks,

I enabled the freeradius plugin and use WPA2 Enterprise to authenticate the WLAN users (this is already working).
With some Printers and IoT Devices i have no possibility to enter credentials, so i would like get them into the right vlan via MAC Address "authentication".

Accourding to https://forum.opnsense.org/index.php?topic=16282.msg74418#msg74418 i just need to create a User and Password with the MAC Adress of the Device.
The thing is: i get a "text validation error" when entering a MAC Adress as user/password..

Wow can i assign the right vlan to these printers and IoT devices?

Thanks,
Title: Re: Dynamic VLAN assignment via MAC Address
Post by: Maurice on September 24, 2023, 02:20:25 PM
Are these wireless devices and are they connected to a PSK WLAN? And you want your APs / WLC to assign them to specific VLANs based on their MAC address? Is this supported by your APs / WLC? This is highly vendor specific.

Cheers
Maurice
Title: Re: Dynamic VLAN assignment via MAC Address
Post by: mimugmail on September 24, 2023, 05:45:57 PM
Just dont use : in both :)
Title: Re: Dynamic VLAN assignment via MAC Address
Post by: stif on September 27, 2023, 02:14:05 AM
thanks @maurice and @mimugmail!

i created a new SSID with "RADIUS MAC Authentication" in unifi controller and added a user+pass with the MAC Address of the IoT Device without the ":" in opnsense freeradius plugin

it works!  8)
Title: Re: Dynamic VLAN assignment via MAC Address
Post by: mimugmail on September 27, 2023, 12:18:07 PM
Yes!  8)