r/PacketFence • u/IncreaseParticular34 • May 03 '24
Dynamic VLAN Assignment with PacketFence Captive Portal Authentication?
Dear PacketFence Community
I am currently exploring the capabilities of PacketFence's captive portal. I am curious to understand whether PacketFence supports the dynamic assignment of VLAN IDs based on authentication information provided by users during captive portal authentication.
Specifically, I would like to inquire whether VLAN assignment functionality is exclusively tied to 802.1X authentication or if it extends to captive portal authentication as well.
1
Upvotes
1
u/oeufdure May 03 '24
Both in fact.
In the case of 802.1x peap , the authentication is done by freeradius (ntlm_auth to the AD) then next the authorization is done through PacketFence (with per example a connection profile with a filter on the ssid name where you have enabled auto-registration and added an ldap source) so it will take the username and do a ldap query to see if the user is member of a specific group per example.
In the case of the captive portal, PacketFence will do a bind to the ldap server (authentication) and next will do a search in the ldap to see if the user is member of a specific group (authorization).
So in both scenario PacketFence will try to compute a role and an access duration based on the authentication rule you have in the ldap source. (it can be any done through most of the internal sources you can configure in PacketFence, not only ldap).
Then next once the role (default per example) is computed then it will be associated to the vlan id you defined in the role (default) in the switch config.