How to configure COA in freeRadius
ulislam.raihan
raihan1780 at gmail.com
Thu Apr 5 14:00:47 CEST 2012
HI ,
I have put the following COA list in authorization section of default file.
The default file is /etc/freeradius/sits-available to enable the COA
request.
update coa{
User-Name="%{User-Name}"
Acct-Session-Id="%Acct-Session-Id"
NAS-IP-Address="%NAS-IP-Address"
Packet-Dst-Port=4200
}
I am sending Access-Request from my java program and listening to port 4200.
I am getting success Access-Accept . but i am not getting any COA request
instead i have seen following error "Info: WARNING: Unknown destination
127.0.0.1:4200 for CoA request."
Can any one tell me wht i have to configure more or what is the problem ?
The output from radius server is below
rad_recv: Access-Request packet from host 127.0.0.1 port 57378, id=1,
length=59
User-Name = "testing"
NAS-IP-Address = 127.0.0.1
NAS-Port = 4200
User-Password = "password"
Thu Apr 5 13:49:52 2012 : Info: # Executing section authorize from file
/etc/freeradius/sites-enabled/default
Thu Apr 5 13:49:52 2012 : Info: +- entering group authorize {...}
Thu Apr 5 13:49:52 2012 : Info: ++[preprocess] returns ok
Thu Apr 5 13:49:52 2012 : Info: ++[chap] returns noop
Thu Apr 5 13:49:52 2012 : Info: ++[mschap] returns noop
Thu Apr 5 13:49:52 2012 : Info: ++[digest] returns noop
Thu Apr 5 13:49:52 2012 : Info: [suffix] No '@' in User-Name = "testing",
looking up realm NULL
Thu Apr 5 13:49:52 2012 : Info: [suffix] No such realm "NULL"
Thu Apr 5 13:49:52 2012 : Info: ++[suffix] returns noop
Thu Apr 5 13:49:52 2012 : Info: [eap] No EAP-Message, not doing EAP
Thu Apr 5 13:49:52 2012 : Info: ++[eap] returns noop
Thu Apr 5 13:49:52 2012 : Info: [files] users: Matched entry testing at
line 49
Thu Apr 5 13:49:52 2012 : Info: ++[files] returns ok
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: %{User-Name} -> testing
Thu Apr 5 13:49:52 2012 : Info: [sql] sql_set_user escaped user -->
'testing'
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql (sql): Reserving sql socket id: 0
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: SELECT id, username,
attribute, value, op FROM radcheck WHERE username =
'%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute,
value, op FROM radcheck WHERE username = 'testing'
ORDER BY id
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql_mysql: query: SELECT id,
username, attribute, value, op FROM radcheck WHERE
username = 'testing' ORDER BY id
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: SELECT groupname
FROM radusergroup WHERE username = '%{SQL-User-Name}'
ORDER BY priority -> SELECT groupname FROM radusergroup
WHERE username = 'testing' ORDER BY priority
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql_mysql: query: SELECT groupname
FROM radusergroup WHERE username = 'testing' ORDER BY
priority
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql (sql): Released sql socket id: 0
Thu Apr 5 13:49:52 2012 : Info: [sql] User testing not found
Thu Apr 5 13:49:52 2012 : Info: ++[sql] returns notfound
Thu Apr 5 13:49:52 2012 : Info: ++[expiration] returns noop
Thu Apr 5 13:49:52 2012 : Info: ++[logintime] returns noop
Thu Apr 5 13:49:52 2012 : Info: ++[pap] returns updated
Thu Apr 5 13:49:52 2012 : Info: expand: %{User-Name} -> testing
Thu Apr 5 13:49:52 2012 : Info: expand: %{Acct-Session-Id} ->
Thu Apr 5 13:49:52 2012 : Info: expand: %{NAS-IP-Address} -> 127.0.0.1
Thu Apr 5 13:49:52 2012 : Debug: WARNING: You are modifying the value of
virtual attribute Packet-Dst-Port. This is not supported.
Thu Apr 5 13:49:52 2012 : Info: ++[coa] returns updated
Thu Apr 5 13:49:52 2012 : Info: Found Auth-Type = PAP
Thu Apr 5 13:49:52 2012 : Info: # Executing group from file
/etc/freeradius/sites-enabled/default
Thu Apr 5 13:49:52 2012 : Info: +- entering group PAP {...}
Thu Apr 5 13:49:52 2012 : Info: [pap] login attempt with password
"password"
Thu Apr 5 13:49:52 2012 : Info: [pap] Using clear text password "password"
Thu Apr 5 13:49:52 2012 : Info: [pap] User authenticated successfully
Thu Apr 5 13:49:52 2012 : Info: ++[pap] returns ok
Thu Apr 5 13:49:52 2012 : Auth: Login OK: [testing/password] (from client
localhost port 4200)
Thu Apr 5 13:49:52 2012 : Info: # Executing section post-auth from file
/etc/freeradius/sites-enabled/default
Thu Apr 5 13:49:52 2012 : Info: +- entering group post-auth {...}
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: %{User-Name} -> testing
Thu Apr 5 13:49:52 2012 : Info: [sql] sql_set_user escaped user -->
'testing'
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: %{User-Password} ->
password
Thu Apr 5 13:49:52 2012 : Info: [sql] expand: INSERT INTO radpostauth
(username, pass, reply, authdate,ip,webport,mediaport)
VALUES ( '%{User-Name}',
'%{%{User-Password}:-%{Chap-Password}}',
'%{reply:Packet-Type}:-%{Role2}', '%S','%{IP}','%{WEBPORT}','%{MEDIAPORT}')
-> INSERT INTO radpostauth (username, pass, reply,
authdate,ip,webport,mediaport) VALUES (
'testing', 'password',
'Access-Accept:-', '2012-04-05 13:49:52','','','')
Thu Apr 5 13:49:52 2012 : Info: [sql] expand:
/var/log/freeradius/sqltrace.sql -> /var/log/freeradius/sqltrace.sql
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql (sql) in sql_postauth: query is
INSERT INTO radpostauth (username, pass, reply,
authdate,ip,webport,mediaport) VALUES (
'testing', 'password',
'Access-Accept:-', '2012-04-05 13:49:52','','','')
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql (sql): Reserving sql socket id: 4
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql_mysql: query: INSERT INTO
radpostauth (username, pass, reply,
authdate,ip,webport,mediaport) VALUES (
'testing', 'password',
'Access-Accept:-', '2012-04-05 13:49:52','','','')
Thu Apr 5 13:49:52 2012 : Debug: rlm_sql (sql): Released sql socket id: 4
Thu Apr 5 13:49:52 2012 : Info: ++[sql] returns ok
Thu Apr 5 13:49:52 2012 : Info: ++[exec] returns noop
Sending Access-Accept of id 1 to 127.0.0.1 port 57378
Role = "http://www.freeradius.org/rfc/attributes.html"
Role2 = "Home A"
Thu Apr 5 13:49:52 2012 : Info: WARNING: Unknown destination 127.0.0.1:4200
for CoA request.
Thu Apr 5 13:49:52 2012 : Info: Do CoA Fail handler here
Thu Apr 5 13:49:52 2012 : Info: Finished request 2.
Thu Apr 5 13:49:52 2012 : Debug: Going to the next request
Thu Apr 5 13:49:52 2012 : Debug: Waking up in 4.9 seconds.
Thu Apr 5 13:49:57 2012 : Info: Cleaning up request 2 ID 1 with timestamp
+1160
Thu Apr 5 13:49:57 2012 : Info: Ready to process requests
Thanks
raihan
--
View this message in context: http://freeradius.1045715.n5.nabble.com/How-to-configure-COA-in-freeRadius-tp5620185p5620185.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
More information about the Freeradius-Users
mailing list