Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Max-Daily-Session not working

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 823 Views 2 Watching
    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.
    • R
      Rafael.Silva
      last edited by

      Hello.

      What is the way to implement the Max-Daily-Session?

      I followed the topic https://forum.netgate.com/topic/139132/need-help-on-max-daily-session-attribute/6
      However, even with the instructions, the rule does not apply.

      I have this example of a user, registered on MySQL, Session-Timeout and Idle-Timeout are working perfectly, only Max-Daily-Session is not.

      962     USER     Session-Timeout :=      10800
      963     USER     Idle-Timeout    :=      600
      964    USER     Max-Daily-Session       :=      600
      

      Thank you.

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

        Hi,

        I followed the topic https://forum.netgate.com/topic/139132/need-help-on-max-daily-session-attribute/6

        I applied the patch @viktor_g proposed.
        Restarted FreeRadius.
        In the GUI I entered a 2 minutes max daily session time.

        ff9de3fa-8ee5-4776-99ea-9d33f382eb93-image.png

        I logged in using this user.
        I was thrown of the portal after 2 minutes with this message in the log and my device's screen :

        Your maximum daily usage time has been reached

        I remove the 2 minutes sessions time out in the GUI.

        Because user 'x' already has 2 minutes used today (Daily !) is set up a 10 minutes time in SQL radcheck table :

        64d9bcf2-9bad-4764-b457-3f5af1c52808-image.png

        ( I also could delete all users's 'x' session info for today from the radacct table. )

        After 10 minutes (600 seconds) I was thrown of the portal again :

        4e80a26f-27a8-4b40-8781-55a2e6ffc6e9-image.png

        => actually close to 8 minutes = my initial 2 minutes already used and another 8 minutes to complete the 10 minutes.

        And again, not possible to login again.
        Note : I didn't tested if I could login again tomorrow ;)

        So, for me it works. The patch seems fine to me.
        You did something I didn't do, or you didn't do something I did.
        What as it ?

        No "help me" PM's please. Use the forum, the community will thank you.

        1 Reply Last reply
        Reply Quote 0
        • R
          Rafael.Silva
          last edited by

          Hello.

          Thanks for listening.

          Would you mind sending me the files you edited? Just to compare, because here, unfortunately it doesn't work.

          Thanks.

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

            edit : see below - bottom - 0.15.7_17 includes this edit.

            See here https://forum.netgate.com/topic/139132/need-help-on-max-daily-session-attribute?_=1600411248200

            pastebin.com (do not post it here) your /usr/local/pkg/freeradius.inc file.

            Just search

            		sql1
            		{$varsqlconf2authorize}
            		}
            

            and add there :

            	dailycounter
            	monthlycounter
            	noresetcounter
            	expire_on_login
            

            just before the line with

               EOD;
            

            Save, stop FreeRadius, start FreeRadius and again, keep in mind settings are thrown away if you upgrade the FreeRadius package.
            But re editing (if needed) is so easy ....

            edit :

            I just upgraded FreeRadius to 0.15.7_17 and this edit (patch) is now included.

            No "help me" PM's please. Use the forum, the community will thank you.

            1 Reply Last reply
            Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
            Privacy Policy · Cookie Policy