Disconnect on Accounting Octet Quota

Javi jmoranrod at gmail.com
Wed Jul 16 08:58:44 CEST 2014


jmoranrod at gmail.com
El 16/07/2014 01:24, "Ali Jawad" <alijawad1 at gmail.com> escribió:
>
> Hi
> I did setup a max monthly quota check to limit the amount of B/W used by
a user. The test worked, BUT only after a user disconnects and reconnects.
While a user is connected he can go over limit and keep doing so. I did do
some reading and obviously the reason is that in radacct acctinputoctets
and acctoutputoctets are only set with a stop signal.
>
> Quote :
>
> This attribute indicates how many octets have been received from the port
over the course of this service being provided, and can only be present in
Accounting-Request records where the Acct-Status-Type is set to Stop.
>
>
> My setup is quite simple ,I do use the below. Now the question is , is
there another approach to overcome this limitation ? Or can I force a
Acct-Status refresh of some sort without disconnecting users ?
>
> sqlcounter daily-BW-counter {
>
>         counter-name = Daily-Session-Octets
>
>         check-name = Max-Daily-Octets
>
>         reply-name = Session-Timeout
>
>         sqlmod-inst = sql
>
>         key = User-Name
>
>         reset = daily
>
>
> query = "SELECT SUM(AcctInputOctets) + SUM(AcctOutputOctets) FROM
radacct  WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) +
AcctSessionTime > '%b'"
>
>
>
>
> }
>
>
> -
I have a module working on my server called " Access-Period " maybe you can
adapt the query to work for your schema.

I don't have access to the server right now, try searching in google for
"access-period module".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140716/b040827a/attachment-0001.html>


More information about the Freeradius-Users mailing list