prepaid volume quota with cisco nas

Anirudh Malhotra 8zero2ops at gmail.com
Thu Dec 31 00:56:12 CET 2015


Hi,

Check this out if it helps. You want to renew data quota every hour to 5 MB, and whenever the data limit is reached you want to deny the access for that hour. Right?

So two cases are made out of this:

To deauth user whenever limit is reached****
- Check accounting packets on every packet run a query on radacct to check if limit is reached for this hour, if it has, send a disconnect. This will enter a "admin-reset" in accounting stop packet in radacct table.

To stop user from authenticating when limit is reached****
- Run a query on sql radacct to check whether the user has been "admin-reset"(this would be sent from case 1 where limit is reached) for this hour, if it has, reject the request.


BR,
Anirudh Malhotra
8zero2
Mail: 8zero2.in at gmail.com
Facebook: www.facebook.com/8zero2
Twitter: @8zero2_in
Blog: blog.8zero2.in

On 30 Dec 2015, 23:37 +0530, riki<phobie at axfr.org>, wrote:
> Hello,
> 
> well this one is working for me. But correct me if i am wrong, but it
> will not solve the state where user downloads first hour only 1MB,
> second hour 2MB and it is still within 5MB quota in 1 over 2 hours.
> 
> So still need to use a described trigger system in case 2 to populate
> stats table.
> 
> Or is there some other preferred way to do this correctly?
> 
> Thanks for your time.
> 
> r.
> 
> 
> On 12/28/2015 02:53 PM, Alan DeKok wrote:
> > On Dec 28, 2015, at 5:52 AM, riki<phobie at axfr.org>wrote:
> > > I want to limit session volume for 5MB per every hour (if achieved in 20
> > > minutes, do not authorize for next 40 minutes).Counters are cumulative
> > > for session so i have identified so far these options:
> > > 
> > > 1. reset session when quota reached with CoA update/disconnect, it will
> > > causes new session every hour if quota is depleted and my query works.
> > 
> > Sending a disconnect packet is probably the best choice.
> > 
> > Alan DeKok.
> > 
> > -
> > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> > 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list