I have been able to configure it to count traffic instead of time, but only when a user first logs in, it’ll then allow or deny them access, however it doesn’t return any attributes such as Max-Input_octets = ??, where ?? is some value(ie account balance) less the sum of acctinputoctets, this would allow the NAS to disconnect a client during the session, ie client has 5Mb on their account, they login but are disconnected after 5Mb of throughput.

 

This is what I’ve done so far, but it only works on login and doesn’t return any attributes:

 

sqlcounter monthlybandwidthcounter {

                counter-name = Max-Bytes

                check-name = Max-Bytes

                sqlmod-inst = sql

                key = User-Name

                reset = monthly

                Reply-Message = "You have reached your bandwidth cap for this Month"

                query = "SELECT sum(AcctOutputOctets) + sum(AcctInputOctets) FROM radacct where UserName = '%{%k}'"

        }

 

I’m using a Colubris MSC-5200

 

R

 

Mark

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Seferovic Edvin
Sent: 16 May 2006 11:59
To: 'FreeRadius users mailing list'
Subject: RE: rlm_sqlcounter developer required

 

Hi,

 

I have been working with sqlcounter and for few of my installations I have changed it funcionality so it is able to count traffic instead of time.

 

What do you need ? What is your NAS ?

 

Send me a mail off the list if you need some specific solution.

 

Regards,

 

Edvin

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Lovatt
Sent: Dienstag, 16. Mai 2006 12:51
To: freeradius-users@lists.freeradius.org
Subject: rlm_sqlcounter developer required

 

Hi,

 

I’m using rlm_sqlcounter to limit the amount of time my users can stay connected to a NAS, which works very well, as you know, it SUMS the amount of time a users has been online by querying the radacct table then returns a Session-Timeout attribute.

 

My NAS supports Max-Input_octets and Max-Output-Octets attributes, I’d like to perform an SQL SUM on AccInputOctets and AccOutputOctets during the authorize phase then return these two attributes to set the max amount of bandwidth a user can use.

 

I’ve spent all day reading about rlm_sqlcounter, this functionality isn’t available but has been talked about previously, what I’m really asking for, since my C knowledge is a little rusty and I’m a bit pressed for time is for one of you guys to patch this module for me, for a price of course.

 

R

 

Mark

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

Reply via email to