CP Quota limit with Freeradius/MySQL
-
Hi all!
I have a Captive Portal running with Freeradius set up with a MySQL server that holds the user data.
This works, but now I need to limit the data quota for the users per day, week or month.Has anybody done this and have some tips or instructions? I have made some tests, but until now without success.
The quota management works fine when running it locally within Freeradius, but when using MySQL it doesn't...
Thanks in advance!
-
@jarlel this is the forum for pfSense software, not for FreeRADIUS. If you are seeking for what FreeRADIUS can and can't do for Authentication/Authorization/Accounting when using a MySQL backend, i would suggest you to ask their mailing list : https://freeradius.org/community/
To reply you shortly however, yes what you are looking for is possible, using the
rlm_sql_counter
module. -
@jarlel said in CP Quota limit with Freeradius/MySQL:
but when using MySQL it doesn't...
FreeRadius needs a book-keeping system where it stores its working data.
A file system based method exists.
MySQL can also be used, as many other databases. Up to you to create a database with tables that contain the correct fields etc.When you setup a limited amount of up- and download traffic for a user like this :
You'll be seeing lines in the log :
When the quota (dialy in my case) is consumed, you see a line like this in the captive portal page :