Disconnect on Accounting Octet Quota

Fajar A. Nugraha list at fajar.net
Wed Jul 16 05:21:35 CEST 2014


On Wed, Jul 16, 2014 at 7:18 AM, Ali Jawad <alijawad1 at gmail.com> wrote:
> 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


Session-timeout -> notifies NAS how long the user can stay connected
in the session. This is not what you want.

You need an attribute which tells the NAS how much data transfer a
user can have in the session. Unfortunately it differs from NAS to
NAS. For example, there's Mikrotik-Total-Limit or
ChilliSpot-Max-Total-Octets. Check whether your NAS supports that
attribute.

-- 
Fajar


More information about the Freeradius-Users mailing list