prepaid volume quota with cisco nas

Anirudh Malhotra 8zero2ops at gmail.com
Thu Dec 31 14:38:12 CET 2015


Hi,

Oh yes, sorry you can run a cronjob for every hour and fetch data for active* users and subtract it from total usage to decide the limit in an extra table :) hope this would solve the problem.

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

On 31 Dec 2015, 14:00 +0530, riki<phobie at axfr.org>, wrote:
> Hello,
> 
> > 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.
> 
> The way queries.conf is written for accounting-update packets will not
> allow you to query for last hour, as there is only timestamp for
> beginning and end of session. So if user will consume 1MB in first hour,
> 2MB in second hour, and 3MB third hour (still one session as there is
> limit reached only in 3rd hour) your suggested way will not allow him to
> use 5MB in 3rd hour, only 2MB.
> 
> I am not asking how to do this, but how to do this correctly, e.g. what
> is common best practice.
> 
> Thanks,
> 
> r.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list