SQLCounter configuration

tnt at kalik.net tnt at kalik.net
Sun Jan 11 19:24:25 CET 2009

>1)      After the time or data volume for a period (say a month) is reached
>the user is automatically disconnected - as expected. Rather them not
>allowing to log in , I would like freeradius to return some other attributes
>(WISPr-Bandwidth-Max-Up and WISPr-Bandwidth-Max-Down work fine with
>ChilliSpot) to be sent to the router for the user, so that a connection is
>still possible, but at a much lower maximum speed. Can that be done, and if
>so, can someone give me a pointer. I was thinking maybe using unlang, but I
>may be barking up the wrong tree.

Create a  sql group called slow that enforces those limits. Add the user
to that group (with low priority) with unlang (on authentication) or
perl sript (on accounting stop packet). Important - remove slow group
entries when counter resets.

>2)      The   reset = monthly   method seem to the first of the current
>month. That is one way of doing it, but I would like the reset to occur at
>the same date in the month every month. So if someone signs up, say on the
>12th of a month, the reset will occur every month on the 12th. Can that be
>done with freeradius?

Yes. Queries are configurable. Don't use %b. Calculate start the way you
see fit.

>3)      Currently I receive something like   Reply-Message = "Your maximum
>never usage time has been reached"   when the counter reaches its limit -
>even when what was counted as not time but data volume. Can Reply-Message
>for sqlcounter be configured as in the expiration module?

No. But you can sort out the reply with unlang.

Ivan Kalik
Kalik Informatika ISP

More information about the Freeradius-Users mailing list