Problem with the attribute "Message-Authenticator"
I write a program to send Access-request packet to the Radius server. The packet format is as follow: __________________________________________________________ | code = 1 | ID = 1 | Length = 73 ( 0x 00 49 ) | __________________________________________________________ | 16 bytes authenticator | __________________________________________________________ | user_name = "test" | __________________________________________________________ | chap_password | __________________________________________________________ | eap_message = "pdsicygx" | __________________________________________________________ | Message_authenticator | __________________________________________________________ The Message_authenticator is calculated as follow: Message_authenticator = HMAC-MD5 (code ,ID, Length,16 bytes Authenticator, user_name,chap_password,eap_message) , using the shared secret between NAS and radius server , in this case ,"testing123". While sending "chap" packets without the "eap_message" and "Message_authenticator" gets "Access request" , sending packets like above gets response from radius server as follow: rad_recv: Access-Request packet from host 202.117.7.223:1408, id=1, length=73 Received packet from 202.117.7.223 with invalid Message-Authenticator! (Shared secret is incorrect.) Server rejecting request 1. Finished request 1 Going to the next request --- Walking the entire request list --- Waking up in 1 seconds... --- Walking the entire request list --- Waking up in 1 seconds... --- Walking the entire request list --- Sending Access-Reject of id 1 to 202.117.7.223:1408 Segmentations of the "Radiusd -X " are as follow: ... Module: Loaded eap eap: default_eap_type = "md5" eap: timer_expire = 60 eap: ignore_unknown_eap_types = no eap: cisco_accounting_username_bug = no rlm_eap: Loaded and initialized type md5 rlm_eap: Loaded and initialized type leap ... Can the "eap_message" attribute be set randomly, in my packets, "pdsicygx"? Is it right to calculate "Message_authenticator" as I did? Regards Guoxian
yao guoxian wrote:
I write a program to send Access-request packet to the Radius server.
This list isn't a general discussion for questions about implementing RADIUS clients. You have access to the FreeRADIUS source code, read it to see how RADIUS should be implemented.
| eap_message = "pdsicygx" |
Uh, no.
Is it right to calculate "Message_authenticator" as I did?
Apparently not. Go read the RFC's. They include test vectors. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Hi! I am trying to process Accounting request to radius but I get the following error from sql module: rlm_sql (sql): Unsupported Acct-Status-Type = 15 I have added the $INCLUDE dictionary.ser line to the dictionary file and the dictionary.ser file contains the following records: VALUE Acct-Status-Type Interim-Update 3 # RFC2866, acc_radius VALUE Acct-Status-Type Failed 15 # RFC2866, acc_radius Why the rlm_sql doesn't see the Acct-Status-Type of the value 15? Thanks in advanced for any help. Below is the Accounting request received by radius. Thu Feb 8 17:02:04 2007 SER-Attr = "" Acct-Session-Id = "18D72091-F179-24E7-4844-A5685A23F085@192.168.0.117" Sip-To-Tag = "b27e1a1d33761e85846fc98f5f3a7e58.42d5" SER-From = "hellboy <sip:hellboy@voip.touk.pl:5061>;tag=612417995" SER-Flags = 12 SER-Original-Request-ID = "sip:hellboy@voip.touk.pl" Sip-Method = "INVITE" Sip-Cseq = 19049 Sip-Translated-Request-ID = "sip:tzl@voip.touk.pl" Sip-Source-IP-Address = 192.168.0.117 Sip-From-Tag = "612417995" SER-To = "<sip:hellboy@voip.touk.pl>;tag=b27e1a1d33761e85846fc98f5f3a7e58.42d5" SER-Digest-Username = "hellboy" SER-Request-Timestamp = 1170950524 Calling-Station-Id = "sip:hellboy@voip.touk.pl:5061" Sip-Source-Port = 5061 SER-Digest-Realm = "voip.touk.pl" Sip-Response-Code = 480 Called-Station-Id = "sip:hellboy@voip.touk.pl" SER-Response-Timestamp = 1170950524 Acct-Status-Type = Failed Service-Type = IAPP-Register NAS-Port = 5060 Acct-Delay-Time = 0 NAS-IP-Address = 127.0.0.1 Acct-Unique-Session-Id = "1276a21c3858a944" Timestamp = 1170950524
tzieleniewski wrote:
Hi!
I am trying to process Accounting request to radius but I get the following error from sql module: rlm_sql (sql): Unsupported Acct-Status-Type = 15
I have added the $INCLUDE dictionary.ser line to the dictionary file and the dictionary.ser file contains the following records: VALUE Acct-Status-Type Interim-Update 3 # RFC2866, acc_radius VALUE Acct-Status-Type Failed 15 # RFC2866, acc_radius
Why the rlm_sql doesn't see the Acct-Status-Type of the value 15?
Because the source code to rlm_sql needs to be updated to support it. There have been ongoing discussions with the OpenSER developers about this. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (3)
-
Alan DeKok -
tzieleniewski -
yao guoxian