<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Study this<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://freeradius.org/radiusd/man/unlang.html">http://freeradius.org/radiusd/man/unlang.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Add the unlang code to post-auth section of default.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> freeradius-users-bounces+anindya.mukherjee=wipro.com@lists.freeradius.org [mailto:freeradius-users-bounces+anindya.mukherjee=wipro.com@lists.freeradius.org]
<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<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dear Mike,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you for your reply.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Il giorno 26/set/2014, alle ore 13:18, Russell Mike <<a href="mailto:radius.sir@gmail.com">radius.sir@gmail.com</a>> ha scritto:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></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><o:p></o:p></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><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">more entries....</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">Thanks / Regards</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Georgia","serif"">RM --</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Georgia","serif""> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
<div>
<p class="MsoNormal">Dear Mike,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Exactly, i need to drop the bandwidth when the user reaches the bandwidth quota.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Can you help me to modify authorize section ?<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS","sans-serif"">OK</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Trebuchet MS","sans-serif"">Thanks</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></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>
<o:p></o:p></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:<o:p></o:p></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><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></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><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></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><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">
http://www.freeradius.org/list/users.html</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</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>www.wipro.com</p>
</body>
</html>