<div dir="ltr"><span style="font-family:georgia,serif">Have You done it ? This should do. Make sure you put "/etc/freeradius/sites-available/default" under authorization section after your sql_counter. <br></span><div><div><font><span style="font-family:georgia,serif"><br>noresetbytescounter {
<br> reject = 1
<br> }
<br>if (reject) {
<br> ok # Over-Ride "Reject"
<br><br> update reply {
<br> Reply-Message := "You have reached your transfer
limit. Limited bandwitch"
<br> }
<br> update control {
<br> Auth-Type := "Accept"
<br> WISPr-Bandwidth-Max-Down = 1280<br> WISPr-Bandwidth-Max-Up = 1280<br> }
<br> }<br><br></span></font></div><div><font><span style="font-family:georgia,serif">Thanks <br><br></span></font></div><div><font><span style="font-family:georgia,serif">RM --<br></span></font></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 3:06 PM, <span dir="ltr"><<a href="mailto:anindya.mukherjee@wipro.com" target="_blank">anindya.mukherjee@wipro.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Study this<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><a href="http://freeradius.org/radiusd/man/unlang.html" target="_blank">http://freeradius.org/radiusd/man/unlang.html</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Add the unlang code to post-auth section of default.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181,196,223) -moz-use-text-color -moz-use-text-color;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif""> freeradius-users-bounces+anindya.mukherjee=<a href="mailto:wipro.com@lists.freeradius.org" target="_blank">wipro.com@lists.freeradius.org</a> [mailto:<a href="mailto:freeradius-users-bounces%2Banindya.mukherjee" target="_blank">freeradius-users-bounces+anindya.mukherjee</a>=<a href="mailto:wipro.com@lists.freeradius.org" target="_blank">wipro.com@lists.freeradius.org</a>]
<b>On Behalf Of </b>Emanuele Fia<br>
<b>Sent:</b> Friday, September 26, 2014 5:03 PM<br>
<b>To:</b> FreeRadius users mailing list<br>
<b>Subject:</b> Re: Sqlcounter fail over<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dear Mike,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you for your reply.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What i don’t understand is how to write skip group “offertaA_unlimited” and use “offertaA_limited” in the update reply<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Il giorno 26/set/2014, alle ore 13:18, Russell Mike <<a href="mailto:radius.sir@gmail.com" target="_blank">radius.sir@gmail.com</a>> ha scritto:<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">No, i would not help all, i want you to learn so that you can troubleshoot as needed. Defiantly, i would give fare idea how that would be done. it is so easy, anyways.
<br>
<br>
In "/etc/freeradius/sites-available/default" , in your case chillispot_max_byte_monthly. Do like this</span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif""><br>
</span><br>
<span style="font-size:13.5pt;font-family:"Georgia","serif"">access-period<br>
expiration</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">more entries....</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt"><span style="font-size:13.5pt;font-family:"Georgia","serif""><br>
chillispot_max_byte_monthly{<br>
reject = 1<br>
}<br>
if(reject){<br>
update reply {<br>
WISPr-Bandwidth-Max-Down := 100k<br>
}<br>
ok = reject<br>
}<br>
<br>
This is not a solution, understand from my example how it is going to work. Please do not copy paste, it would not work.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">Thanks / Regards</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">RM --</span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia","serif""> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Sep 26, 2014 at 9:59 AM, Emanuele Fia <<a href="mailto:emanuele.fia@gmail.com" target="_blank">emanuele.fia@gmail.com</a>> wrote:<u></u><u></u></p>
<div>
<p class="MsoNormal">Dear Mike,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Exactly, i need to drop the bandwidth when the user reaches the bandwidth quota.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can you help me to modify authorize section ?<u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Il giorno 26/set/2014, alle ore 11:26, Russell Mike <<a href="mailto:radius.sir@gmail.com" target="_blank">radius.sir@gmail.com</a>> ha scritto:<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS","sans-serif"">OK</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS","sans-serif"">You need to do unlang coding for that, you need to modify freeradius reply under authorize section. To be sure, are you saying when a user reaches the bandwidth quota you do not want
to deny rather drop the bandwidth to 100K. Right? </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS","sans-serif"">Thanks</span><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Sep 26, 2014 at 8:56 AM, Emanuele Fia <<a href="mailto:emanuele.fia@gmail.com" target="_blank">emanuele.fia@gmail.com</a>> wrote:<br>
<br>
<u></u><u></u></p>
<p class="MsoNormal">Dear Mike,<br>
<br>
Thank you for your answer.<br>
<br>
>Now happen that when sqlcounter 'Max-Monthly-TrafficIN' reach the value set in radgroupreply return auth reject.<br>
<br>
When the counter 'Max-Monthly-TrafficIN’ reach the value 5000000 freeradius reply with access-reject that is not what i need. I need that when the counter reach the value of 5000000 freeradius reply with 'offertaA_limited' reply settings.<br>
<br>
The problem is the access-reject that send the sqlcounter.<br>
<br>
(Reply when counter reach the specified value )<br>
<br>
Sending Access-Request of id 23 to 127.0.0.1 port 1812<br>
User-Name = "1berrinoma1228721nx"<br>
User-Password = "su72ug"<br>
NAS-IP-Address = 78.159.220.181<br>
NAS-Port = 1812<br>
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=23, length=70<br>
Reply-Message = "Your maximum monthly usage time has been reached”<br>
<br>
<br>
Il giorno 26/set/2014, alle ore 10:45, Russell Mike <<a href="mailto:radius.sir@gmail.com" target="_blank">radius.sir@gmail.com</a>> ha scritto:<u></u><u></u></p>
<div>
<p class="MsoNormal"><br>
> Hi<br>
><br>
> this is how it should work as you explained. what is wrong ? what do you want? please explain more. did you check if your counter does reset every month ?<br>
><br>
> Thanks<br>
><br>
><br>
> On Thu, Sep 25, 2014 at 12:05 PM, Emanuele Fia <<a href="mailto:emanuele.fia@gmail.com" target="_blank">emanuele.fia@gmail.com</a>> wrote:<br>
> Dear Freeradius Users,<br>
><br>
> I need some help in my freeradius configuration.<br>
><br>
> radusergroup<br>
> +---------------------+---------------------+----------+<br>
> | username | groupname | priority |<br>
> +---------------------+---------------------+----------+<br>
> | 1aaaaaaaaa1228721nx | offertaA_unlimited | 1 |<br>
> | 1aaaaaaaaa1228721nx | offertaA_limited | 2 |<br>
> +---------------------+---------------------+----------+<br>
><br>
> radgroupcheck<br>
> +----+---------------------+-----------------------+----+---------+<br>
> | id | groupname | attribute | op | value |<br>
> +----+---------------------+-----------------------+----+---------+<br>
> | 35 | offertaA_unlimited | Max-Monthly-TrafficIN | := | 5000000 |<br>
> +----+---------------------+-----------------------+----+---------+<br>
><br>
> radgroupreply<br>
> +-----+---------------------+---------------------+----+------------+<br>
> | id | groupname | attribute | op | value |<br>
> +-----+---------------------+---------------------+----+------------+<br>
> | 207 | offertaA_unlimited | Fall-Through | = | yes |<br>
> | 205 | offertaA_unlimited | Rate-Limit | = | 2048k/512k |<br>
> | 211 | offertaA_limited | Fall-Through | = | yes |<br>
> | 209 | offertaA_limited | Rate-Limit | = | 100k/100k |<br>
> +-----+---------------------+---------------------+----+------------+<br>
><br>
><br>
> My goal is that user '1aaaaaaaaa1228721nx' use the group 'offertaA_unlimited' until the attribute 'Max-Monthly-TrafficIN' ( sqlcounter ) reach the value and after this radius reply with settings of the group 'offertaA_limited'<br>
><br>
> Now happen that when sqlcounter 'Max-Monthly-TrafficIN' reach the value set in radgroupreply return auth reject.<br>
><br>
> Probably there is something to do in policy.conf, i have done some test without results =(<br>
><br>
> Thank you for help,<br>
> Emanuele<br>
><br>
> -<br>
> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><br>
><br>
> -<br>
> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><br>
<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal">-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
<p>The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.</p>
<p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.</p>
<p><a href="http://www.wipro.com" target="_blank">www.wipro.com</a></p>
</div>
<br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br></div></div></div></div>