Do you have a way to differentiate what user goes to what VLAN as part of the user field or is this done with an attribute past with the RADIUS response?
i.e.

staff_username
username_code
usernameID

If you do, you can write a regex to look for specific attributes in the username field past by the RADIUS packet. You can also manipulate this packet before it gets processed to inject or strip information. I'm not sure how your process flows but this should work.


-Antonio

On 04/07/2011 05:46 AM, Martin Quensel wrote:
Yes I have read that part and also seen the code examples.
It does not scale well to hardcode what Vlan a user is a member of in thecustom.pm  
<http://custom.pm>.

The problem with the code examples is that i only get a node object, and can do 
stuff on the node. That means that the

username is what i get but i would need the whole user, so i could for example 
use the notes field of the user to send the user to
diffrent costomVlans.

I probably will have to implement something that reads a flatfile with the 
usernames and customvlans, and then

edit that flatfile for every user i add.

Anyone out there that has done this, and has a good soloution for it?

Best Regards!


Hi Martin,

We are using something similar but via SSID.  Take a look at

/usr/local/pf/lib/pf/vlan/custom.pm  <http://custom.pm>.

There's a bunch of examples in that file (including by username) , also
take a look at the Admin Guide and search for Custom VLAN assigment.



-Antonio



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev


_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to