Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    CP Quota limit with Freeradius/MySQL

    Scheduled Pinned Locked Moved Captive Portal
    3 Posts 3 Posters 740 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jarlel
      last edited by

      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!

      F GertjanG 2 Replies Last reply Reply Quote 0
      • F
        free4 Rebel Alliance @jarlel
        last edited by free4

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

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @jarlel
          last edited by Gertjan

          @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

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.