Disconnect user when hit bandwith

Mohamad Yazdian m.programer at gmail.com
Fri Aug 26 20:10:07 CEST 2016

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"

More information about the Freeradius-Users mailing list