The short version of my question is how do I limit individual user sessions to 24 hours, even if each session has the same UserName.
I have a radius server setup with CoovaChilli to authenticate wireless users to access the network. All the users have to do is agree to a "Terms of Service", so I have one user account which is free for everybody:
| 22 | freeuser | Simultaneous-Use | := | 99 | | 21 | freeuser | User-Password | := | freepass |
I would like to limit each individual user's session to 24 hours. But the Max-All-Session counter is:
query = "SELECT SUM(AcctSessionTime) \ FROM radacct WHERE UserName='%{%k}'"
So if I specify a Max-All-Session, then each free user's login time will count towards that 24 hour limit, and every session will expire too soon. Is it possible to use two keys for that sql counter so I can check the UserName and the CalledStationId? That should let me limit the individual session time by MAC address as well as user name.
Or is there a different/better way I should be trying to approach this problem? Thanks!