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!


  • Rebel Alliance

    @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 :

    1be2a07d-4c7a-4a85-aa01-54ddf96d31c4-image.png

    You'll be seeing lines in the log :

    6468f8aa-e8f7-4b04-a759-111c40ba5036-image.png

    When the quota (dialy in my case) is consumed, you see a line like this in the captive portal page :

    a359cccd-a09f-4698-92bb-da86d2b30a4c-image.png


Log in to reply