I wonder if anyone can help me.
The goal is to assign different users different ip address based on the AP they connect to. I cannot statically set this as users will travel and end up connecting via a different ap.
So i wanted to do a check to see if i can match the nas ip and then assign that user to a group, which in turn, the group will allocate the correct IP Pool.
I've done quite abit of research and its seems to be as simple as adding it to the radgroupcheck table. Like such:
id | groupname | attribute | value | op
----+-----------+----------------+------------+----
1 | Group1 | Nas-IP-Address | x.x.x.x | ==
4 | Group1 | Pool-Name | POOL1 | :=
However in the radius -X i do no even see it attempting to check the group.
It seems to check the radusergroup table, but there is nothing in there due to the fact i need to set the user group dynamically based on location.
Any help would be appreciated.
Thanks
Rob
I think you should be able to use NAS Huntgroups to do what you're attempting to do,
Following the example, create the table:
Add in your NAS addresses:
Then in the
authorize {}
section, you'd add this code:You can then add in lines in the
radgroupcheck
table to check other values (if needed), or just theradgroupreply
table where you can assign them a specific pool..The Answer by NickW, should in theory work. However for some reason it worked using a radtest but failed when i authed via the AP. I am using EAP, so wpa2-enterpise with a signed cert. ( I followed this guide, note that im using a centos server not ubuntu )
I ended up going into my site-enabled/default, in the post-auth section i added this before my sqlippool.
My table layout is standard, i added the radhuntgroup as sugested by NickW, then match that to my radgroupcheck table, like such
radhuntgroup:
radgroupcheck:
So the result in my radiusd -X is as follows
I hope this info can help someone else going through the same struggle i went through.