Hi i need to assign uptime limit to my user (no session limit) but i can't find (or not exsist) the voule of attribute for radreply table for setting the uptime limit.... anyone can help me ??? sorry for my english...
Hi i need to assign uptime limit to my user (no session limit) but i can't find (or not exsist) the voule of attribute for radreply table for setting the uptime limit...
Read freeradius docs and wiki about rlm_sqlcounter module ... hope this helps.
If i insert in radcheck 2 users test with 2 other attribute(:= Max-All-Session and == 'password'), at the login time radius response Username or password incorrect.
SELECT *
FROM `radcheck`
+----+----------------+-----------------+----+------------+
| id | UserName | Attribute | op | Value |
+----+----------------+-----------------+----+------------+
| 83 | test | User-Password | == | test |
| 84 | test | Max-All-Session | := | 20 |
+----+----------------+-----------------+----+------------+
If i were you id use radiusmanager, it can do all that plus more with less configurations. Victor is a cool cat and he runs and operates the software, im using it now with 60-100 users active spanning 13 hotspots http://www.dmasoftlab.com/cont/home
hope this helps, btw i made my own just like you did and then went radmanager soon as i seen it
I'm using MT + FreeRadius + MySql and i have the authentication scenario working, but i can't find one attribute that replaces the Uptime limit.
I'm also using Daloradius because it's easier to create users and set their attributes.
If you have profiles in Daloradius it recognizes the attributes and set the attribute to radcheck or radreply automatically. I think it's a good choice for you, and it's free
I think this attribute (acct-session-time) only returns the time ( in seconds ) that the user was receiving service. I cannot set it's value so it would decrease.
I think the value is set to 0 by deault and than will increase the number of seconds the user was receiving service.
I have no idea if there's an easy solution via built in features, but a viable solution would be to use a DB trigger that takes the Acct-Session-Time value when inserting an ACCOUNTING STOP record, and updates the value for an attribute used to set Session-Timeout. That way you can just serve that well supported value at session start - if the client browses for longer than he's got uptime for, he'll just get disconnected. If he disconnects before that, the time used is subtracted from the maximum uptime he can have next session. Not particularly elegant, but if no one else can find an elegant solution it might be worth trying.
I use "WISPr-Session-Terminate-Time" in the radreply table to limit uptime. Once that time is past, the client is logged out and cannot login again. You must have NTP client set in the router, or this doesn't work.
This time format was a little tricky. It is "yyyy-mm-ddThh:mm:ss". Note the date/time separator is an upper case 'T'.
ADD: I noticed there is also a "Session-Timeout" attribute available. I think it also goes in the radreply table. The 'op' is '<=' and the value is in seconds.
If you are looking for a cumulative counter that tracks uptime totals from all sessions, that is a FreeRADIUS function. You will probably need to activate one of the counter scripts in the FreeRADIUS setup. From my understanding, it will start the "Session-Timeout" value at the original setting in the radreply table, and every logout, the script subtracts the uptime from that session. The next login, the "Session-Timeout" value sent for that user will be less. Search your radiusd.conf file for 'counter daily'.
it was problem for us also implementing hotspot with time limit because mt without user manager does not have such option.
as we dont want to use mt-s usermanager found that freeradius sql counter make the trick.
sqlcounter accessperiod {
counter-name = period
check-name = period
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT ABS(EXTRACT(EPOCH FROM AcctStartTime - now())::integer) \
FROM radacct \
WHERE UserName='%{%k}' \
ORDER BY AcctStartTime \
LIMIT 1;"
}
Has anyone tried CIITIX? http://ciitix.ciit.net.pk/index.php/ciitix-wifi
What is CIITIX-WiFi ?
CIITIX-WiFi is a turnkey solution to your WiFi network needs.
Just download the ISO burn to disc and install.
It has debian,freeradius,mysql,daloradius with an easy install gui
You can make this setting,
Only enable checking daily in radius.conf, site-available/default, site-enable/default.Isso will accept the daily check and enable the module count daily.
{instantiate
daily
}
authorize {
daily
}
On / modules / couter this counters daily, uncomment the module attribute and daily diary, in command verficação SQL, replace the radiusaccounting to radacct, which will check the day count of the User:
query = "SELECT IFNULL (SUM (acctsessiontime - GREATEST ((% b - UNIX_TIMESTAMP (acctstarttime)), 0)), 0) FROM radacct WHERE username = '% {% k}' AND UNIX_TIMESTAMP (acctstarttime) + acctsessiontime> '% b '"