[FreeRadius] Help how do I make Expiration
Hello, I'm having a problem creating a user that, when logged in, will not be able to be used again for 1 hour after logging in. I tried using session-timeout, but I can still log in for the next hour. I was hoping to prevent logging in again after 1 hour. I found sources from several articles using the Expiration attribute, but I'm having a problem where it doesn't count as 1 hour after logging in. Please help. I use freeradius root@rad:~# freeradius -X FreeRADIUS Version 3.0.26 Copyright (C) 1999-2021 The FreeRADIUS server project and contributors There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
On Aug 20, 2025, at 9:31 AM, Horas Hajovan Siregar <horas@tunneling.my.id> wrote:
Hello, I'm having a problem creating a user that, when logged in, will not be able to be used again for 1 hour after logging in.
I tried using session-timeout, but I can still log in for the next hour. I was hoping to prevent logging in again after 1 hour.
Session-Timeout is only for one session. If you want to limit total time across multiple sessions, see the sqlcounter module.
I found sources from several articles using the Expiration attribute,
Or you could look at the official FreeRADIUS documentation: https://www.freeradius.org/documentation/freeradius-server/3.2.8/
but I'm having a problem where it doesn't count as 1 hour after logging in.
Is the NAS sending accounting packets?
Please help.
I use freeradius
root@rad:~# freeradius -X FreeRADIUS Version 3.0.26 Copyright (C) 1999-2021 The FreeRADIUS server project and contributors There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I have no idea why you think posting that will be useful. It's not. http://wiki.freeradius.org/list-help There is a huge amount of documentation on how to run the server and debug it. It helps to read the docs. Alan DeKok.
Hello @Alan DeKok I mean If we use the Expiration attribute in FreeRADIUS, the format is an absolute date and time, for example: '23 Aug 2025 22:30:00' The problem: This expiration cannot be calculated automatically per login. If you set it directly in radcheck, the user will expire at a specific time, not relative to the first login. Is there a way to automatically expire a user within the next day upon first login, and the user cannot be reused after 1 day? On 2025-08-20 20:31, Horas Hajovan Siregar wrote:
Hello, I'm having a problem creating a user that, when logged in, will not be able to be used again for 1 hour after logging in.
I tried using session-timeout, but I can still log in for the next hour. I was hoping to prevent logging in again after 1 hour.
I found sources from several articles using the Expiration attribute,
but I'm having a problem where it doesn't count as 1 hour after logging in.
Please help.
I use freeradius
root@rad:~# freeradius -X FreeRADIUS Version 3.0.26 Copyright (C) 1999-2021 The FreeRADIUS server project and contributors There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
On 21/08/2025 04:18, Horas Hajovan Siregar wrote:
The problem: This expiration cannot be calculated automatically per login. If you set it directly in radcheck, the user will expire at a specific time, not relative to the first login.
Is there a way to automatically expire a user within the next day upon first login, and the user cannot be reused after 1 day?
Did you look at the sqlcounter module like Alan said? -- Matthew
Hallo @matthew I don't see, but i try sqlcounter Using SQL Counter is suitable for total online sessions. I'm currently testing a method where the user's first login will expire within the desired timeframe. For example, user A gets 1 hour, user B gets 2 hours, and so on. Bdw, why this replay thread not received to my mail, On 21/08/2025 04:18, Horas Hajovan Siregar wrote:
The problem: This expiration cannot be calculated automatically per login. If you set it directly in radcheck, the user will expire at a specific time, not relative to the first login.
Is there a way to automatically expire a user within the next day upon first login, and the user cannot be reused after 1 day?
Did you look at the sqlcounter module like Alan said? -- Matthew
participants (3)
-
Alan DeKok -
Horas Hajovan Siregar -
Matthew Newton