Max-Daily-Session not working
-
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.
-
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.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 :
( 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 :
=> 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 ? -
Hello.
Thanks for listening.
Would you mind sending me the files you edited? Just to compare, because here, unfortunately it doesn't work.
Thanks.
-
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.