RE: Freeradius accounting question

This is a discussion on RE: Freeradius accounting question within the FreeRADIUS Users forums, part of the Networking and Network Related category; freeradius-users-admin@lists.freeradius.org wrote: > My guess would be that you need to set the "Session-...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2005
mmiranda@americatel.com.sv
 
Posts: n/a
Default RE: Freeradius accounting question

freeradius-users-admin@lists.freeradius.org wrote:
> My guess would be that you need to set the "Session-Timeout"
> variable.
> hope this helps.
>
> Andrey


Yes, it will help, im using it on production, the counter module sets the
Session-Timeout automatically
i.e.

keciel# cat radiusd.conf
[... blablabla ...]
sqlcounter webcards_counter {
counter-name = Max-All-Session
check-name = Max-All-Session
sqlmod-inst = sql
key = User-Name
reset = never

query = "SELECT SUM(AcctSessionTime)
FROM radacct_stop
WHERE UserName='%{%k}'
AND servicetype = 'Framed-User'"

}

autohrize {
[... blablabla ...]
webcards_counter
}

Im using mysql but you can do it in user file instead, just create the
usergroup/username mapping and set the radgroupcheck validation:

mysql> select * from usergroup where groupname = 'pp_webcard_5h';

+-------+------------+---------------+
| id | UserName | GroupName |
+-------+------------+---------------+
| 112 | cs11873458 | pp_webcard_5h |
+-------+------------+---------------+

mysql> select * from radgroupcheck where attribute = 'Max-All-Session';
+----+-----------------+-----------------+----+--------+
| id | GroupName | Attribute | op | Value |
+----+-----------------+-----------------+----+--------+
| 44 | pp_webcard_5h | Max-All-Session | := | 18000 |
+----+-----------------+-----------------+----+--------+

So the UserName cs11873458 is allowed to connect only 5 hours, the counter
will sum all the connectiontime used until it reaches this time (18000
secs), and sets Session-Timeout = 18000 - sum(connecttiotime), the nas will
"drop" the connecttion automatically.

Hope this helps, BTW, this is not the right place to start with linux, you
need some good admin skills to understand these "advanced" configurations

--
Miguel


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:16 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0