Disconnect user when hit bandwidth
<p>I configure the FreeRadius server on Centos 6.x and authentication work fine on mysql database.
But I can't use the sqlcounter to check the preiodicaly sum bandwith are use my users from the mysql database.</p>

<p>I make a sqlcount like this:</p>

<pre><code>sqlcounter  wifi_Limit{
count-attribute = Acct-Input-Octets
counter-name = Mikrotik-Total-Limit
check-name = Mikrotik-Total-Limit
reply-name = Session-Timeout
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT ((SUM(AcctInputOctets)+SUM(AcctOutputOctets))) FROM radacct WHERE UserName='%{%k}'"
</code></pre>

<p>}</p>

<p>and also insert the wifi_limite in the "site-available default" authorize{} like this:</p>

<pre><code>poyrazwifi_Limit{
    reject = 1
}
if(reject){
    reject
}
</code></pre>

<p>and I insert the "Mikrotik-Total-Limit" attribute in the radcheck like this:</p>

<pre><code>insert into radcheck(username,attribute,op,value) values('test','Mikrotik-Total-Limit',':=','999999')
</code></pre>

<p>Now this configuration is work fine when user after used the total bandwith "999999" disconnect pppoe connection manoaly after that this user can't login again.</p>

<p>But I like to disconnect user automatically when the use total bandwidth "999999".</p>

<p>Please advise me to fix this problem.
Thank You</p>