How to update user's Session-Time attribute through Coa

prometeotv at prometeotv at
Wed Jun 27 18:56:06 CEST 2018


Hi guys
I am running freeradius ver on CentOS 6.0. I have
configured freeradius with sql_counter module and all is working fine:
users are disconnected when they reached the time or traffic
Now my goal is to implement CoA on freeradius in order to
update the Time (Session-Timeout) and Traffic (Mikrotik-Xmit-Limit)
attribute, every time the NAS server (Mikrotik) sends the interim update
packet, : how can I achieve that?

I add this inside the accounting
section of the file /ETC/SITE-AVAILABLE/DEFAULT

 update coa {

User-Name = "%{User-Name}"
 Acct-Session-Id = "%{Acct-Session-Id}"

NAS-IP-Address = "%{NAS-IP-Address}"
 Framed-IP-Address =
 Session-Timeout = "%{Session-Timeout}"

update control {
 Send-CoA-Request =

and this inside

client {
 secret =

require_message_authenticator = no
 nastype =

piazzalaterale-coa {
 type = coa

 # Note
that a home server of type
"coa" MUST be a real NAS,
 # with an ipaddr
or ipv6addr. It CANNOT point
to a virtual
 # server.
 ipaddr =
 port = 3799

 # This
secret SHOULD NOT be the same as the
 # secret in a "client"
 secret = xxxxxx

 # CoA
specific parameters. See
raddb/proxy.conf for details.
 coa {
 irt = 2

mrt = 16
 mrc = 5
 mrd =

but when the CoA packet is sent to the
NAS the Session-Timeout attribute is set to 0 instead of to the residual
credit time of the user.

I need that because if two people log-in
simultaneosly with the same username, they should share the credit
time/traffic instead, without CoA, they will both have the same

Sorry for my English....I hope to have been clear

Best regards

Con MyOpen hai Giga, SMS e i minuti che vuoi da 3€ al mese, per sempre. Cambi gratis quando e come vuoi e in più hai 10€ di credito omaggio!

More information about the Freeradius-Users mailing list