Disconnect user when hit bandwith

Vijay S vijay.hcr at gmail.com
Sun Aug 28 08:39:43 CEST 2016

Hi Mohamad,
Set reply value of 1g manually for user and see if it disconnect on usage
of 1g  in mikrotik nas before diving into freeradius configuration details.
Once you sure that your nas is doing what it meant to do then you can start
digging into FR config.

Vijay A.
+91 9930804010

On Aug 26, 2016 11:41 PM, "Mohamad Yazdian" <m.programer at gmail.com> wrote:

I use freeradius for authenticate my PPPoE users and I NAS router is
every think is fine like as authentication and expiration in the monthly
date but now I like to limit my users for 1G downloadn per month but when I
make a sqlcounter and add this counter to the site-available default

I use the Mikrotik-Total-Limit in my sqlcounter and add this counter name
on the radcheck table for my users so when my users hit the 1G bandwith (1
week etc.) the connections are not droped...!!!
But when the users disconnect the pppoe connection and try again to connect
get the access denied message.

I like to dissconnect the pppoe connection when hit 1G.

Please advise me how to solve this issue.

Thank you

sqlcounter  sample_Limit{
counter-name = Mikrotik-Total-Limit
                check-name = Mikrotik-Total-Limit
                reply-name = Mikrotik-Total-Limit
                sqlmod-inst = sql
                key = User-Name
                reset = never
                query = "SELECT
((SUM(AcctInputOctets)+SUM(AcctOutputOctets))) FROM radacct WHERE

reject = 1
update reply {
Reply-Message := "You have reached your bandwidth limit"
List info/subscribe/unsubscribe? See http://www.freeradius.org/

More information about the Freeradius-Users mailing list