<div dir="ltr">Hello <div><br></div><div>I have setup freeradius with mikrotik as NAS. I am working on a ISP project where i need to make some package like traffic limit per month</div><div><br></div><div>for example one user can use 4GB of traffic with speed of 1mbps after the 4GB we will be disconnect automatically...</div>
<div><br></div><div>i configure counter.conf</div><div><br></div><div><br></div><div><div>sqlcounter monthlytraffic {</div><div> counter-name = Monthly-Traffic</div><div> check-name = Max-Monthly-Traffic</div>
<div> reply-name = Mikrotik-Xmit-Limit-Gigawords</div><div> sqlmod-inst = sql</div><div> key = User-Name</div><div> reset = monthly</div><div>query = "SELECT SUM(AcctInputOctets - GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0))+ SUM(AcctOutputOctets -GREATEST((%b - >UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime '%b'"</div>
<div>}</div><div><br></div><div>And added following in mysql database table radcheck</div><div><br></div><div><span style="display:block;overflow:hidden">| username | attribute | op | value |</span><span style="display:block;overflow:hidden">| user | Cleartext-Password | := | internet |<br>
</span><span style="display:block;overflow:hidden">| user | Mikrotik-Xmit-Limit-Gigawords | := | 2 |<br></span><span style="display:block;overflow:hidden">| user | Expiration | := | 08 Aug 2014 |</span></div><div><br></div>
<div><br></div><div>but this is not working kindly help to solve this problem</div><div><br></div>-- <br><b>Regards<br></b><font color="#888888"><font color="#888888">Santu Roy<br><a href="http://www.megahostzone.com/" target="_blank">www.megahostzone.com</a><br>
</font></font></div></div>