How to update user's Session-Time attribute through Coa
    prometeotv at tiscali.it 
    prometeotv at tiscali.it
       
    Wed Jun 27 18:56:06 CEST 2018
    
    
  
  
Hi guys
I am running freeradius ver 2.2.6.7 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
assigned.
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
#COA
 update coa {
User-Name = "%{User-Name}"
 Acct-Session-Id = "%{Acct-Session-Id}"
NAS-IP-Address = "%{NAS-IP-Address}"
 Framed-IP-Address =
"%{Framed-IP-Address}"
 Session-Timeout = "%{Session-Timeout}"
 }
update control {
 Send-CoA-Request =
 Yes
}
and this inside
CLIENTS.CONF:
client 0.0.0.0/0 {
 secret =
xxxxxxx
require_message_authenticator = no
 nastype =
other
}
#COA
home_server
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 =
192.168.0.201
 port = 3799
 # This
secret SHOULD NOT be the same as the
shared
 # secret in a "client"
section.
 secret = xxxxxx
 # CoA
specific parameters. See
raddb/proxy.conf for details.
 coa {
 irt = 2
mrt = 16
 mrc = 5
 mrd =
30
 }
}
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
credit
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!
SCOPRI DI PIU’ http://tisca.li/MailHPMobile
    
    
More information about the Freeradius-Users
mailing list