rlm_sqlcounter developer required

Mark Lovatt mlovatt at catalystmanagement.co.uk
Tue May 16 14:03:47 CEST 2006

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







freeradius-users-bounces+mlovatt=catalystmanagement.co.uk at lists.freeradius.o
[mailto:freeradius-users-bounces+mlovatt=catalystmanagement.co.uk at lists.free
radius.org] On Behalf Of Seferovic Edvin
Sent: 16 May 2006 11:59
To: 'FreeRadius users mailing list'
Subject: RE: rlm_sqlcounter developer required




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.







From: freeradius-users-bounces+edvin.seferovic=kolp.at at lists.freeradius.org
[mailto:freeradius-users-bounces+edvin.seferovic=kolp.at at lists.freeradius.or
g] On Behalf Of Mark Lovatt
Sent: Dienstag, 16. Mai 2006 12:51
To: freeradius-users at lists.freeradius.org
Subject: rlm_sqlcounter developer required




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.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060516/8be2680e/attachment.html>

More information about the Freeradius-Users mailing list