Hi Jan. Thanks for your reply. I think i found the problem, and it was related with the parameters in the radiusclient.conf, so thanks for all the help. Now i have another question. I'm usigin RADIATOR to collect the RADIUS messages sent by SER. All the messages that i obtain are like this:
Code: Access-Request Identifier: 109 Authentic: <151>h<240><131>DJf<235>e<9><178><16>.'<139><254> Attributes: User-Name = "ricardo@XX.XX.XX.246" Digest-Attributes = <10><9>ricardo Digest-Attributes = <1><15>XX.XX.XX.246 Digest-Attributes = <2>*4135ec97cd9b352532c886e50d3812f9e139797a Digest-Attributes = <4><19>sip:XX.XX.XX.246 Digest-Attributes = <3><10>REGISTER Digest-Attributes = <5><6>auth Digest-Attributes = <9><10>00000001 Digest-Attributes = <8><10>d40e8d74 Digest-Response = "853abb10c811a6e059394aaa1d7e63d1" Service-Type = Sip-Session Sip-Uri-User = "5552203289" NAS-IP-Address = 127.0.0.1 NAS-Port = 5060
As you can see i have only Digest-Attribute attr, is this a normal RADIUS packet from SER. Or maybe i have a dictionary mismatch or somethign else? I was expecting something like this :
User-Name = "ricardo@XX.XX.XX.246" Digest-User-Name = <10><9>ricardo Digest-Realm = <1><15>XX.XX.XX.246 Digest-Nonce = <2>*4135ec97cd9b352532c886e50d3812f9e139797a Digest-Uri = <4><19>sip:XX.XX.XX.246 Digest-Method = <3><10>REGISTER Digest-Response = "853abb10c811a6e059394aaa1d7e63d1" Service-Type = Sip-Session Sip-Uri-User = "5552203289" NAS-IP-Address = 127.0.0.1 NAS-Port = 5060
With the Digest attributes more defined. Do i have to set up something else? I really hope that someone can help me.
Thanks in advance.
Ricardo
-----Mensaje original----- De: Jan Janak [SMTP:jan@iptel.org] Enviado el: Martes, 31 de Agosto de 2004 08:48 a.m. Para: Ricardo Martinez CC: 'serusers@lists.iptel.org' Asunto: Re: [Serusers] Authorization Problems with Radius.
The log error below does not say why authentication failed. I would recommend you to use some sniffer to see if the radiusclient library sends any packets to the server.
Here is the list of common problems:
- the hostname of the radius server is not configured properly in radiusclient.conf (authserver)
- The shared secret is not configured properly, the shared secret dictionary is by default in /usr/local/etc/radiusclient/servers
- The shared secret is not configured properly in the server
- radius server is missing SIP related attributes.
Jan.
On 30-08 13:30, Ricardo Martinez wrote:
Hi. I'm new in SER, but i have followed all the instructions to install the RADIUS interaction. Now i have obtaining the nex error in the console
debug
when a REGISTER message arrives to the SER.
7(21063) check_nonce(): comparing [4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c] and [4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c] 7(21063) radius_authorize_sterman(): Failure 7(21063) build_auth_hf(): 'WWW-Authenticate: Digest
realm="XX.XX.XX.XX",
nonce="4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c" ' 7(21063) parse_headers: flags=-1 7(21063) check_via_address(64.76.148.186, 64.76.148.186, 0) 7(21063) receive_msg: cleaning up
Here is my ser.cfg
# # $Id: ser.cfg,v 1.21.2.2 2003/10/13 22:53:06 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
debug=7 # debug level (cmd line: -dddddddddd) fork=yes log_stderror=yes # (cmd line: -E)
#Uncomment these lines to enter debugging mode #fork=no #log_stderror=yes
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) port=5060 children=4 fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database #loadmodule "/usr/local//lib/ser/modules/mysql.so"
loadmodule "/usr/local//lib/ser/modules/sl.so" loadmodule "/usr/local//lib/ser/modules/tm.so" loadmodule "/usr/local//lib/ser/modules/rr.so" loadmodule "/usr/local//lib/ser/modules/maxfwd.so" loadmodule "/usr/local//lib/ser/modules/usrloc.so" loadmodule "/usr/local//lib/ser/modules/registrar.so" loadmodule "/usr/local//lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/local/lib/ser/modules/auth.so" #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so" loadmodule "/usr/local/lib/ser/modules/group_radius.so" loadmodule "/usr/local/lib/ser/modules/acc.so"
# ----------------- setting module-specific parameters ---------------
# ----------------- setting module-specific parameters --------------- # -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
modparam("acc","log_level",1)
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radius cl
ient.conf") modparam("auth_radius","service_type",15)
modparam("acc","radius_config","/usr/local/etc/radiusclient/radiusclient.c on
f") modparam("acc", "service_type", 15) modparam("acc", "radius_flag", 1) modparam("acc", "radius_missed_flag", 3) modparam("acc", "failed_transactions", 1) modparam("acc", "report_ack", 0)
#group radius
modparam("group_radius","radius_config","/usr/local/etc/radiusclient/radiu sc
lient.conf") modparam("group_radius", "use_domain", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol if (!method=="REGISTER") record_route(); # subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); break; }; if (!uri==myself) { # mark routing logic in request append_hf("P-hint: outbound\r\n"); route(1); break; }; # if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) { if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (! radius_www_authorize("")) { www_challenge("", "0"); break; };
save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; # native SIP destinations are handled using our USRLOC
DB
if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; }; append_hf("P-hint: usrloc applied\r\n"); route(1);
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
In my radiusclient.cfg i have configured for authentication
localhost:1645.
In my Radius Server (Radiator) i'm not see any Radius message.
What is the problem? Hope someone can help me
Thank in advance BEst Regards
Ricardo Martinez.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
That's how digest over RADIUS works, digest attributes are mapped as sub-attributes of Digest-Attributes, see
http://www.softarmor.com/wgdb/docs/draft-sterman-aaa-sip-00.txt
for more information.
Jan.
On 31-08 10:49, Ricardo Martinez wrote:
Hi Jan. Thanks for your reply. I think i found the problem, and it was related with the parameters in the radiusclient.conf, so thanks for all the help. Now i have another question. I'm usigin RADIATOR to collect the RADIUS messages sent by SER. All the messages that i obtain are like this:
Code: Access-Request Identifier: 109 Authentic: <151>h<240><131>DJf<235>e<9><178><16>.'<139><254> Attributes: User-Name = "ricardo@XX.XX.XX.246" Digest-Attributes = <10><9>ricardo Digest-Attributes = <1><15>XX.XX.XX.246 Digest-Attributes = <2>*4135ec97cd9b352532c886e50d3812f9e139797a Digest-Attributes = <4><19>sip:XX.XX.XX.246 Digest-Attributes = <3><10>REGISTER Digest-Attributes = <5><6>auth Digest-Attributes = <9><10>00000001 Digest-Attributes = <8><10>d40e8d74 Digest-Response = "853abb10c811a6e059394aaa1d7e63d1" Service-Type = Sip-Session Sip-Uri-User = "5552203289" NAS-IP-Address = 127.0.0.1 NAS-Port = 5060
As you can see i have only Digest-Attribute attr, is this a normal RADIUS packet from SER. Or maybe i have a dictionary mismatch or somethign else? I was expecting something like this :
User-Name = "ricardo@XX.XX.XX.246" Digest-User-Name = <10><9>ricardo Digest-Realm = <1><15>XX.XX.XX.246 Digest-Nonce = <2>*4135ec97cd9b352532c886e50d3812f9e139797a Digest-Uri = <4><19>sip:XX.XX.XX.246 Digest-Method = <3><10>REGISTER Digest-Response = "853abb10c811a6e059394aaa1d7e63d1" Service-Type = Sip-Session Sip-Uri-User = "5552203289" NAS-IP-Address = 127.0.0.1 NAS-Port = 5060
With the Digest attributes more defined. Do i have to set up something else? I really hope that someone can help me.
Thanks in advance.
Ricardo
-----Mensaje original----- De: Jan Janak [SMTP:jan@iptel.org] Enviado el: Martes, 31 de Agosto de 2004 08:48 a.m. Para: Ricardo Martinez CC: 'serusers@lists.iptel.org' Asunto: Re: [Serusers] Authorization Problems with Radius.
The log error below does not say why authentication failed. I would recommend you to use some sniffer to see if the radiusclient library sends any packets to the server.
Here is the list of common problems:
- the hostname of the radius server is not configured properly in radiusclient.conf (authserver)
- The shared secret is not configured properly, the shared secret dictionary is by default in /usr/local/etc/radiusclient/servers
- The shared secret is not configured properly in the server
- radius server is missing SIP related attributes.
Jan.
On 30-08 13:30, Ricardo Martinez wrote:
Hi. I'm new in SER, but i have followed all the instructions to install the RADIUS interaction. Now i have obtaining the nex error in the console
debug
when a REGISTER message arrives to the SER.
7(21063) check_nonce(): comparing [4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c] and [4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c] 7(21063) radius_authorize_sterman(): Failure 7(21063) build_auth_hf(): 'WWW-Authenticate: Digest
realm="XX.XX.XX.XX",
nonce="4134bbc79ed1bc9d3f911cb33ff4c399d7cdea8c" ' 7(21063) parse_headers: flags=-1 7(21063) check_via_address(64.76.148.186, 64.76.148.186, 0) 7(21063) receive_msg: cleaning up
Here is my ser.cfg
# # $Id: ser.cfg,v 1.21.2.2 2003/10/13 22:53:06 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
debug=7 # debug level (cmd line: -dddddddddd) fork=yes log_stderror=yes # (cmd line: -E)
#Uncomment these lines to enter debugging mode #fork=no #log_stderror=yes
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) port=5060 children=4 fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database #loadmodule "/usr/local//lib/ser/modules/mysql.so"
loadmodule "/usr/local//lib/ser/modules/sl.so" loadmodule "/usr/local//lib/ser/modules/tm.so" loadmodule "/usr/local//lib/ser/modules/rr.so" loadmodule "/usr/local//lib/ser/modules/maxfwd.so" loadmodule "/usr/local//lib/ser/modules/usrloc.so" loadmodule "/usr/local//lib/ser/modules/registrar.so" loadmodule "/usr/local//lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/local/lib/ser/modules/auth.so" #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so" loadmodule "/usr/local/lib/ser/modules/group_radius.so" loadmodule "/usr/local/lib/ser/modules/acc.so"
# ----------------- setting module-specific parameters ---------------
# ----------------- setting module-specific parameters --------------- # -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
modparam("acc","log_level",1)
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radius cl
ient.conf") modparam("auth_radius","service_type",15)
modparam("acc","radius_config","/usr/local/etc/radiusclient/radiusclient.c on
f") modparam("acc", "service_type", 15) modparam("acc", "radius_flag", 1) modparam("acc", "radius_missed_flag", 3) modparam("acc", "failed_transactions", 1) modparam("acc", "report_ack", 0)
#group radius
modparam("group_radius","radius_config","/usr/local/etc/radiusclient/radiu sc
lient.conf") modparam("group_radius", "use_domain", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol if (!method=="REGISTER") record_route(); # subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); break; }; if (!uri==myself) { # mark routing logic in request append_hf("P-hint: outbound\r\n"); route(1); break; }; # if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) { if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (! radius_www_authorize("")) { www_challenge("", "0"); break; };
save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; # native SIP destinations are handled using our USRLOC
DB
if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; }; append_hf("P-hint: usrloc applied\r\n"); route(1);
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
In my radiusclient.cfg i have configured for authentication
localhost:1645.
In my Radius Server (Radiator) i'm not see any Radius message.
What is the problem? Hope someone can help me
Thank in advance BEst Regards
Ricardo Martinez.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers