Hi guys,
First I want to thank you for this awesome soft.
And to the point - I use accel-ppp for pppoe with radius AAA. I have some prepaid users. When they connect, radius sends session-timeout and they disconnect when their prepaid period ends.
But when client pays I can't find a way to update the session-timeout without disconnecting the user. As I understand I have to use COA(dae-server).
Am I correct? And what is the correct way to do this?
Thank you in advance.
session-timeout update
Re: session-timeout update
Hi, yes. Use DM/CoA, I think only reconnect user.
or
for exampledae-server=x.x.x.x:port,secret
Specifies IP address, port to bind and secret for Dynamic Authorization Extension server (DM/CoA).
Code: Select all
[radius]
dae-server=100.64.0.1:3799,testing123
Code: Select all
echo "Acct-Session-Id=55dd1a11e0546abc" | radclient 100.64.0.1:3799 disconnect testing123
Code: Select all
echo "User-Name=1111" | radclient 100.64.0.1:3799 disconnect testing123
Re: session-timeout update
Thank you for the quick answer. I am playing with this:
And it works without disconnecting client, which is my desired behavior. The only problem left is my freeradius. I activated coa and put this in "accounting":
But in debug:
%{Session-Timeout} is empty. I guess I have to get its value from somewhere before putting it in accounting?
P.S. I think I found a way:
It works for me. Is it a good way to achieve what I want?
And what is the default/recommended value for "acct-interim-interval"?
P.P.S. It works when decreasing Session-Timeout. When I want to increase it it sends the correct value to accel-ppp but it seems accel-ppp does not respect the increased value. Is it a bug or a feature?
Code: Select all
echo 'Framed-IP-Address=10.1.2.3,Session-Timeout=1000' | radclient 10.2.3.4:3799 coa password
Code: Select all
update coa {
User-Name = "%{User-Name}"
Acct-Session-Id = "%{Acct-Session-Id}"
NAS-IP-Address = "%{NAS-IP-Address}"
Session-Timeout = "%{Session-Timeout}"
}
Code: Select all
++update coa {
expand: %{User-Name} -> test2
expand: %{Acct-Session-Id} -> 5737aac0e237d0de
expand: %{NAS-IP-Address} -> 10.2.3.4
expand: %{Session-Timeout} ->
++}
P.S. I think I found a way:
Code: Select all
update coa {
User-Name = "%{User-Name}"
Acct-Session-Id = "%{Acct-Session-Id}"
NAS-IP-Address = "%{NAS-IP-Address}"
Session-Timeout = "%{sql:SELECT ( extract(epoch from end_period) - extract(epoch from now()) )::integer FROM users where users.username='%{User-Name}'}"
}
And what is the default/recommended value for "acct-interim-interval"?
P.P.S. It works when decreasing Session-Timeout. When I want to increase it it sends the correct value to accel-ppp but it seems accel-ppp does not respect the increased value. Is it a bug or a feature?