RE: Implimenting Capping with FreeRadius

2006-04-04 Thread Jaco van Tonder
I have modified the sqlcounter module to not only replying with a
Session-Timeout but with another attribute - Recv-Limit in my case as it is
supported by my NAS. The counter module then simply does a query on the
database during the access request processing and returns the limit allowed
for the user based on the maximum - used value set in the radcheck table for
the user or radgroupcheck for the user's group.

This works better than an external script as it will also limit the user for
the current session - and it implies that he will never be able to use more
than his allowed maximum

Jaco van Tonder

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Shawn Hamman
Sent: 03 April 2006 03:23 PM
To: freeradius-users@lists.freeradius.org
Subject: Implimenting Capping with FreeRadius

Hi,

OS: Fedora C4
FR: 1.0.2-2
DB: MySQL 4.1.11-2

I was wondering if anybody has a more elegant solution to implementing 
capping with FreeRadius than writing a script that totals the bytes in/out 
in the radacct table every couple of minutes and updates the radcheck table 
to deny further logins?

Shawn 

- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Implimenting Capping with FreeRadius

2006-04-03 Thread Shawn Hamman

Hi,

OS: Fedora C4
FR: 1.0.2-2
DB: MySQL 4.1.11-2

I was wondering if anybody has a more elegant solution to implementing 
capping with FreeRadius than writing a script that totals the bytes in/out 
in the radacct table every couple of minutes and updates the radcheck table 
to deny further logins?


Shawn 

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Implimenting Capping with FreeRadius

2006-04-03 Thread Alan DeKok
Shawn Hamman [EMAIL PROTECTED] wrote:
 I was wondering if anybody has a more elegant solution to implementing 
 capping with FreeRadius than writing a script that totals the bytes in/out 
 in the radacct table every couple of minutes and updates the radcheck table 
 to deny further logins?

  Have a script that runs when the server receives accounting packets,
and do the work there.

  Alan DeKok.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Implimenting Capping with FreeRadius

2006-04-03 Thread Peter Nixon
On Mon 03 Apr 2006 16:22, Shawn Hamman wrote:
 Hi,

 OS: Fedora C4
 FR: 1.0.2-2
 DB: MySQL 4.1.11-2

 I was wondering if anybody has a more elegant solution to implementing
 capping with FreeRadius than writing a script that totals the bytes in/out
 in the radacct table every couple of minutes and updates the radcheck table
 to deny further logins?

Sure. The elegant solution is to simply check the sum of the user's 
minutes/bytes from the radacct table in the same query that queries the 
radcheck table. You can either do this as a (quite complex) join or 
preferably inside a stored procedure. (You may wish to put appropriate 
indexes on the radacct table to speed things up)

Cheers

-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc


pgpNPCiXlewzQ.pgp
Description: PGP signature
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html