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

    Freeradius Max-All-Session

    Scheduled Pinned Locked Moved Captive Portal
    3 Posts 2 Posters 4.9k 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.
    • A
      azmihamzah
      last edited by

      Can pfsense captive portal support freeradius Max-All-Session attr? TQ

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        You can do it by running
        sysctl net.inet.ip.pfil.inbound="ipfw,pf"
        sysctl net.inet.ip.pfil.outbound="ipfw,pf"

        Then add rules on the Firewall->Rules  that limit the sessions of users to wanted limits by using "Simultaneous client connection limit" under Advanced options of rules.

        1 Reply Last reply Reply Quote 0
        • A
          azmihamzah
          last edited by

          first of all thanks ermal for the kind reply.
          i've been successfully able to accomplish what i want to do.
          For the sake of pfsense community, i want to share with you guys here.

          Actually, what i want to do is using captive-portal with freeradius attr, Max-All-Session with sql database (freeradius server is on another box). So, that i can generate prepaid account with time limit (eg: 5 hours of usage) which the account will be automatically expired/rejected when the limit is exceeded.

          It seems that my problem lies in config file of freeradius. I need to add some line for noresetcounter. In freeradius version 2.0, the setting to be enable is at ../modules/counter ;to enable noresetcounter, add a line under instantiate to enable noresetcounter in radiusd.conf, and a line to enable noresetcounterin /site-enable/default under authorize. I installed freeradius with -mysql support.

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