I dont believe freeradius can do this. At least not with SQL because I didnt see any SELECT commands which satisfy this situation in sql.conf
One way is set something like that
simul_count_query = "SELECT COUNT(*) FROM radacct
inner Join usergroup on radacct.UserName = usergroup.UserName where usergroup.GroupName = 'Group-Name' AND AcctStopTime = 0"
In this situation you can limit only one group and not limit connections per-user.
I think better way is write rlm_sql_counter module for this proporsal, because it work in same algorithm.
Add some Attribute SQL-Group-Simulation-Use and SQL-Group-Name -Simulation-Use
And check count(*) < SQL-Group-Simulation-Use for SQL-Group-Name-Simulation-Use
it need a little practice in C and a 1-2 hour.
But there could be a simple way to manage this problem. By assigning one username to your group and giving 20 as Simultaneous-Use limit. So
everybody use the same user/pass combination. Now I am sure, most probably you already thought of this :) but you cant use.
Well, it also shouldnt be very difficult to add a groupwise simultaneous use attribute to freeradius since it already has simultaneous use attribute, this should be trivial. Instead of writing a script, maybe you should dig into sources :)
I want to have a simultaneous-use limit for groups. E.g., I have, say, 50 users in group1 and I want to set limit for group1 to, say, 20... If there are already 20 online dialup users at any given time, 21st users will be denied access. (user<->group relation is already set up in database)
Is there an attribute to achieve this or should I go for writing a small script to execute externally upon every request??
Rick.
-------------------- Posted throw the news.gmane.com To group "gmane.comp.freeradius.user"
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html