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

    Problem with freeradius

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 547 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.
    • F
      fmohcine26
      last edited by

      I recently wanted to use '' Download quantity and download traffic ''
      limit the amount of traffic of each user in 1200 Mb per day
      But when i fill the box '' Quantity of download and download of traffic '' by the number volus: 1200
      this user account no longer works, while all other accounts are working properly
      Things are fine when I delete the number of traffic in the box.
      in pictures all the manipulations I made;
      I added a cronjobe << 0 0 * * * root / bin / rm / var / log / radacct / datacounter / day / used-bytes - * >>

      Thank very much
      TraficAndBandw.png
      TraficAndBandw.png_thumb
      PrUserBandw.png
      PrUserBandw.png_thumb
      disabl.png
      disabl.png_thumb
      accounti.png
      accounti.png_thumb

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

        Your last image : as per https://doc.pfsense.org/index.php/Using_Captive_Portal_with_FreeRADIUS - Section : Amount of Traffic the option "re-authenticate users every minute" should be set so the user gets disconnected.
        Otherwise your limit of "1200" (Mbytes) will not work …

        What I did to check / debug all this :
        I read this : https://doc.pfsense.org/index.php/Testing_FreeRADIUS
        This : https://doc.pfsense.org/index.php/Additional_Logging_for_FreeRADIUS (written for 2.x but useful).

        Also : when your setup is ok, goto    Status => Services
        STOP the radius daemon.

        Acces the console. Take option 8 - SSH access.
        Type```
        radiusd -h

        Read …
        Find the option -X
        Use it !
        
        Start radfius by hand using
        **radiusd -X**
        
        (or **radiusd -X -xx**)
        
        Now you have all the info - there should be no red lines.
        
        Keep this console window open.
        
        Now login with a user on the captive portal.
        
        The entire login info will be laid out, and it's easy to find what went wrong.
        
        Questions about what being shown , Normal. Radius is not some small program, it's huge, took me days of just reading this one https://fr.wikipedia.org/wiki/FreeRADIUS and many others. With manuals, Radius (FreeRadius) is useless.
        
        > I added a cronjobe << 0 0 * * * root / bin / rm / var / log / radacct / datacounter / day / used-bytes - * >>
        
        This won't work  :) For example, "day" doesn't exist.
        
        See image for my cron entries, I used the the cron package of course.
        
        ![cron.PNG_thumb](/public/_imported_attachments_/1/cron.PNG_thumb)
        ![cron.PNG](/public/_imported_attachments_/1/cron.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.