Help with Configuration

Alexandre Le Noir muhanadali27 at gmail.com
Mon Nov 24 20:03:03 UTC 2025


You don't understand me. I know that Disconnect a user with Coa is very
easy.

But the problem is how to make the termination happen after the user's time
is expire.

What I am doing now is using an external tool

through disconnect.conf in mods-enabled.

It contains:

exec coa_disconnect {
    wait = yes
         program = “/usr/local/bin/coa_disconnect.sh %{User-Name}”
    shell_escape = yes
}

And also policy.d/disconnect.conf

expire_disconnect {
    update control {
        &Tmp-Integer-0 := “%{sql:SELECT IF(expiration < NOW(), 1, 0) FROM
rm_users WHERE username = ‘%{User-Name}’ and ppp = ‘1’ LIMIT 1}”
    }


    if (&control:Tmp-Integer-0 == 1 && !&reply:Class) {
        update reply {
            &Reply-Message := “Your session has expired - redirecting...”
        }
        coa_disconnect
update control {
            &Tmp-Integer-0 := “%{sql:UPDATE rm_users SET ppp=‘0’ WHERE
username=‘%{User-Name}’}”
        }
    }
}

‫في الاثنين، 24 نوفمبر 2025 في 10:58 م تمت كتابة ما يلي بواسطة ‪Alexandre
Le Noir‬‏ <‪muhanadali27 at gmail.com‬‏>:‬

> The attached file is only a signature certificate.
>
>
>
> ‫في الاثنين، 24 نوفمبر 2025 في 10:16 م تمت كتابة ما يلي بواسطة ‪Alan DeKok
> via Freeradius-Users‬‏ <‪freeradius-users at lists.freeradius.org‬‏>:‬
>
>> On Nov 24, 2025, at 2:09 PM, Alexandre Le Noir <muhanadali27 at gmail.com>
>> wrote:
>> > where is the instructions ?
>>
>>   Try reading my message:
>>
>> >> See sites-available/coa-relay
>> >>
>> >> That's a virtual server which makes it easy to disconnect users.  You
>> >> will need to follow the instructions in the comments in that file, but
>> it
>> >> should work.
>>
>>   Alan DeKok.
>>
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>>
>


More information about the Freeradius-Users mailing list