[Serusers] Authorization Problems with Radius.
Jan Janak
jan at iptel.org
Tue Aug 31 14:47:45 CEST 2004
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:
1) the hostname of the radius server is not configured
properly in radiusclient.conf (authserver)
2) The shared secret is not configured properly, the shared secret
dictionary is by default in /usr/local/etc/radiusclient/servers
3) The shared secret is not configured properly in the server
4) 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/radiuscl
> ient.conf")
> modparam("auth_radius","service_type",15)
> modparam("acc","radius_config","/usr/local/etc/radiusclient/radiusclient.con
> 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/radiusc
> 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 at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list