Sqlcounter fail over

Russell Mike radius.sir at gmail.com
Mon Sep 29 16:56:00 CEST 2014


Have You done it ? This should do. Make sure you put
"/etc/freeradius/sites-available/default" under authorization section after
your sql_counter.

noresetbytescounter {
            reject = 1
        }
if (reject) {
                ok   # Over-Ride "Reject"

                update reply {
                        Reply-Message := "You have reached your transfer
limit. Limited bandwitch"
            }
                update control {
                        Auth-Type := "Accept"
                        WISPr-Bandwidth-Max-Down = 1280
                        WISPr-Bandwidth-Max-Up = 1280
            }
        }

Thanks

RM --

On Fri, Sep 26, 2014 at 3:06 PM, <anindya.mukherjee at wipro.com> wrote:

>  Study this
>
>
>
> http://freeradius.org/radiusd/man/unlang.html
>
>
>
> Add the unlang code to post-auth section of default.
>
>
>
> *From:* freeradius-users-bounces+anindya.mukherjee=
> wipro.com at lists.freeradius.org [mailto:
> freeradius-users-bounces+anindya.mukherjee=wipro.com at lists.freeradius.org]
> *On Behalf Of *Emanuele Fia
> *Sent:* Friday, September 26, 2014 5:03 PM
> *To:* FreeRadius users mailing list
> *Subject:* Re: Sqlcounter fail over
>
>
>
> Dear Mike,
>
>
>
> Thank you for your reply.
>
>
>
> What i don’t understand is how to write skip group “offertaA_unlimited”
> and use “offertaA_limited” in the update reply
>
>
>
> Il giorno 26/set/2014, alle ore 13:18, Russell Mike <radius.sir at gmail.com>
> ha scritto:
>
>
>
>    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.
>
> In "/etc/freeradius/sites-available/default" , in your case
> chillispot_max_byte_monthly.  Do like this
>
>
>
> access-period
> expiration
>
> more entries....
>
>
> chillispot_max_byte_monthly{
>         reject = 1
>     }
>     if(reject){
>             update reply {
>                     WISPr-Bandwidth-Max-Down := 100k
>             }
>             ok = reject
>     }
>
> This is not a solution, understand from my example how it is going to
> work. Please do not copy paste, it would not work.
>
> Thanks / Regards
>
> RM --
>
>
>
>
>
>
>
> On Fri, Sep 26, 2014 at 9:59 AM, Emanuele Fia <emanuele.fia at gmail.com>
> wrote:
>
> Dear Mike,
>
>
>
> Exactly, i need to drop the bandwidth when the user reaches the bandwidth
> quota.
>
>
>
> Can you help me to modify authorize section ?
>
>
>
>
>
> Il giorno 26/set/2014, alle ore 11:26, Russell Mike <radius.sir at gmail.com>
> ha scritto:
>
>
>
>   OK
>
>
>
> 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?
>
>
>
> Thanks
>
>
>
>
>
> On Fri, Sep 26, 2014 at 8:56 AM, Emanuele Fia <emanuele.fia at gmail.com>
> wrote:
>
>  Dear Mike,
>
> Thank you for your answer.
>
> >Now happen that when sqlcounter 'Max-Monthly-TrafficIN' reach the value
> set in radgroupreply return auth reject.
>
> 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.
>
> The problem is the access-reject that send the sqlcounter.
>
> (Reply when counter reach the specified value )
>
> Sending Access-Request of id 23 to 127.0.0.1 port 1812
>         User-Name = "1berrinoma1228721nx"
>         User-Password = "su72ug"
>         NAS-IP-Address = 78.159.220.181
>         NAS-Port = 1812
> rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=23,
> length=70
>         Reply-Message = "Your maximum monthly usage time has been reached”
>
>
> Il giorno 26/set/2014, alle ore 10:45, Russell Mike <radius.sir at gmail.com>
> ha scritto:
>
>
> > Hi
> >
> > 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 ?
> >
> > Thanks
> >
> >
> > On Thu, Sep 25, 2014 at 12:05 PM, Emanuele Fia <emanuele.fia at gmail.com>
> wrote:
> > Dear Freeradius Users,
> >
> > I need some help in my freeradius configuration.
> >
> > radusergroup
> > +---------------------+---------------------+----------+
> > | username            | groupname           | priority |
> > +---------------------+---------------------+----------+
> > | 1aaaaaaaaa1228721nx | offertaA_unlimited  |        1 |
> > | 1aaaaaaaaa1228721nx | offertaA_limited    |        2 |
> > +---------------------+---------------------+----------+
> >
> > radgroupcheck
> > +----+---------------------+-----------------------+----+---------+
> > | id | groupname           | attribute             | op | value   |
> > +----+---------------------+-----------------------+----+---------+
> > | 35 | offertaA_unlimited  | Max-Monthly-TrafficIN | := | 5000000 |
> > +----+---------------------+-----------------------+----+---------+
> >
> > radgroupreply
> > +-----+---------------------+---------------------+----+------------+
> > | id  | groupname          | attribute            | op | value      |
> > +-----+---------------------+---------------------+----+------------+
> > | 207 | offertaA_unlimited | Fall-Through         | =  | yes        |
> > | 205 | offertaA_unlimited | Rate-Limit           | =  | 2048k/512k |
> > | 211 | offertaA_limited   | Fall-Through         | =  | yes        |
> > | 209 | offertaA_limited   | Rate-Limit           | =  | 100k/100k  |
> > +-----+---------------------+---------------------+----+------------+
> >
> >
> > 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'
> >
> > Now happen that when sqlcounter 'Max-Monthly-TrafficIN' reach the value
> set in radgroupreply return auth reject.
> >
> > Probably there is something to do in policy.conf, i have done some test
> without results =(
> >
> > Thank you for help,
> > Emanuele
> >
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> >
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
>
> 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.
>
> 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.
>
> www.wipro.com
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140929/962e0780/attachment-0001.html>


More information about the Freeradius-Users mailing list