[Chilli] Data Volume Control Quota Coova-Chilli
Russell Mike
radius.sir at gmail.com
Fri Feb 15 12:14:45 UTC 2013
> Dear David B. List Members,
>
> i want to implement quota based vouchers, i know how that works but need
> little help.
>
> 1.) i need to create Freeradius RLM SQL_Counter module. *DONE !*
> 2.) Include & load module using "radiusd.conf" in module section &
> authorize section of sites-available/default *DONE !*
>
> *3.) *Accounting already been done by SQL
> *
> *
> i am looking for check & reply items for Freeraiuds & Coova those can
> control quota/volume.
> *
> *
> i am trying like this but not working:
> *
> *
> check: no attribute
> reply: Chillispot-Max-Total-Octets := 5000000 (5MB)
> *
> *
> Thanks / Regards
> RM --
> *
> *
> *
> *
> **
>
*Hi, *Since no one responded, I am going to reply my own post. Because i am
able to solve the problem. i assume that you want quota based vouchers. For
example, BOB has a voucher that should allows him to download 5mb of data
and disconnect from the CoovaChilli after words. if he attempted to re
login, he must be get rejected and get *"Your maximum never usage time has
been reached" *
CoovaChilli v1.3.0 Freeradius v2.2
1.) Create SQL Counter, here is working one.
sqlcounter foreverbitscounter {
counter-name = Total-Max-Octets
check-name = ChilliSpot-Max-Total-Octets
reply-name = ChilliSpot-Max-Total-Octets
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT (SUM(AcctInputOctets)+-SUM(AcctOutputOctets)) FROM radacct
WHERE UserName='%{%k}'"
}
2.) Let Freeradius read counter module before loading, many of you already
know, this is for new admins.
Type this under instantiate section of "radiusd.conf"
instantiate {
some other entries..
foreverbitscounter
}
3.) Finally Load The Module by listing under "authorize" section of default
file, located on the following location
RH & CentOS:
"/etc/raddb/sites-available/default
Ubuntu:
"/etc/freeradius/sites-available/default
authorize {
some other entries
foreverbitscounter
}
start Freeradius in debug mode.
Ubuntu: freeradius -XXX
CentOS: radiusd -XXX
Attach this attributes to radius group/profile
Check Item:
ChilliSpot-Max-Total-Octets := 5000000 (5mb)
Reply Item:
ChilliSpot-Max-Total-Octets := 5000000 (5mb)
Enjoy, this is all you need for voucher quotas system, of course working
rlm_sql driver.
NOTE: Accounting must be done by SQL else it would not work
Enable Accounting:
RH & CentOS:
"/etc/raddb/sites-available/default
Ubuntu:
"/etc/freeradius/sites-available/default
accounting {
some other entries
sql
}
Thanks
RM --
You need the following attribute in radgroupcheck & radgroupreply table.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20130215/fa957fbc/attachment.html>
More information about the Chilli
mailing list