Re: radtest ok, xsupplicant fails (was : Problem compiling Freeradius on RH 9.0)

From: Madhusudan Singh (spammers-go-here_at_yahoo.com)
Date: 05/09/04


Date: Sun, 09 May 2004 12:31:08 -0400

On Friday 07 May 2004 06:10, Ingo Strauch (strauch@mail.desy.de) held forth
in comp.os.linux.misc (<slrnc9mo4s.k3h.strauch@togo.desy.de>):

> On Thu, 06 May 2004 10:13:33 -0400, Madhusudan Singh wrote:
>
> All *.o files are used twice. This doesn't work. Seems like the Makefile
> ist broken. Either fix that or copy'n'paste the entire command and edit
> out all double entries.
>
> Cheers,
> Ingo
>

Thanks for your response. I downloaded the latest snapshot which fixes these
Makefile problems. The radius server compiles and installs now, but now I
have a problem getting Xsupplicant on a client to work.

I have tested the freeradius server on localhost :

[root@svr certs]# radiusd -A -X
Starting - reading configuration files ...
reread_config: reading radiusd.conf
Config: including file: /etc/raddb/proxy.conf
Config: including file: /etc/raddb/clients.conf
Config: including file: /etc/raddb/snmp.conf
Config: including file: /etc/raddb/eap.conf
Config: including file: /etc/raddb/sql.conf
main: prefix = "/usr/local/freeradius"
main: localstatedir = "/usr/local/freeradius/var"
main: logdir = "/usr/local/freeradius/var/log/radius"
main: libdir = "/usr/local/freeradius/lib"
main: radacctdir = "/usr/local/freeradius/var/log/radius/radacct"
main: hostname_lookups = no
main: max_request_time = 30
main: cleanup_delay = 5
main: max_requests = 1024
main: delete_blocked_requests = 0
main: port = 0
main: allow_core_dumps = no
main: log_stripped_names = no
main: log_file = "/usr/local/freeradius/var/log/radius/radius.log"
main: log_auth = no
main: log_auth_badpass = no
main: log_auth_goodpass = no
main: pidfile = "/usr/local/freeradius/var/run/radiusd/radiusd.pid"
main: user = "(null)"
main: group = "(null)"
main: usercollide = no
main: lower_user = "no"
main: lower_pass = "no"
main: nospace_user = "no"
main: nospace_pass = "no"
main: checkrad = "/usr/local/freeradius/sbin/checkrad"
main: proxy_requests = yes
proxy: retry_delay = 5
proxy: retry_count = 3
proxy: synchronous = no
proxy: default_fallback = yes
proxy: dead_time = 120
proxy: post_proxy_authorize = yes
proxy: wake_all_if_all_dead = no
security: max_attributes = 200
security: reject_delay = 1
security: status_server = no
main: debug_level = 0
read_config_files: reading dictionary
read_config_files: reading naslist
Using deprecated naslist file. Support for this will go away soon.
read_config_files: reading clients
read_config_files: reading realms
radiusd: entering modules setup
Module: Library search path is /usr/local/freeradius/lib
Module: Loaded exec
exec: wait = yes
exec: program = "(null)"
exec: input_pairs = "request"
exec: output_pairs = "(null)"
exec: packet_type = "(null)"
rlm_exec: Wait=yes but no output defined. Did you mean output=none?
Module: Instantiated exec (exec)
Module: Loaded expr
Module: Instantiated expr (expr)
Module: Loaded System
unix: cache = no
unix: passwd = "(null)"
unix: shadow = "(null)"
unix: group = "(null)"
unix: radwtmp = "/usr/local/freeradius/var/log/radius/radwtmp"
unix: usegroup = no
unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded eap
eap: default_eap_type = "tls"
eap: timer_expire = 60
eap: ignore_unknown_eap_types = no
eap: cisco_accounting_username_bug = no
tls: rsa_key_exchange = no
tls: dh_key_exchange = yes
tls: rsa_key_length = 512
tls: dh_key_length = 512
tls: verify_depth = 0
tls: CA_path = "(null)"
tls: pem_file_type = yes
tls: private_key_file = "/etc/raddb/certs/svr.pem"
tls: certificate_file = "/etc/raddb/certs/svr.pem"
tls: CA_file = "/etc/raddb/certs/root.pem"
tls: private_key_password = "whatever"
tls: dh_file = "/etc/raddb/certs/dh"
tls: random_file = "/etc/raddb/certs/random"
tls: fragment_size = 1750
tls: include_length = yes
tls: check_crl = no
tls: check_cert_cn = "(null)"
rlm_eap: Loaded and initialized type tls
mschapv2: with_ntdomain_hack = no
rlm_eap: Loaded and initialized type mschapv2
Module: Instantiated eap (eap)
Module: Loaded preprocess
preprocess: huntgroups = "/etc/raddb/huntgroups"
preprocess: hints = "/etc/raddb/hints"
preprocess: with_ascend_hack = no
preprocess: ascend_channels_per_line = 23
preprocess: with_ntdomain_hack = no
preprocess: with_specialix_jetstream_hack = no
preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
realm: format = "suffix"
realm: delimiter = "@"
realm: ignore_default = no
realm: ignore_null = no
Module: Instantiated realm (suffix)
Module: Loaded files
files: usersfile = "/etc/raddb/users"
files: acctusersfile = "/etc/raddb/acct_users"
files: preproxy_usersfile = "/etc/raddb/preproxy_users"
files: compat = "no"
Module: Instantiated files (files)
Module: Loaded Acct-Unique-Session-Id
acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Client-IP-Address, NAS-Port"
Module: Instantiated acct_unique (acct_unique)
Module: Loaded detail
detail: detailfile =
"/usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
detail: detailperm = 384
detail: dirperm = 493
detail: locking = no
Module: Instantiated detail (detail)
Module: Loaded radutmp
radutmp: filename = "/usr/local/freeradius/var/log/radius/radutmp"
radutmp: username = "%{User-Name}"
radutmp: case_sensitive = yes
radutmp: check_with_nas = yes
radutmp: perm = 384
radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on authentication *:1812
Listening on accounting *:1813
Listening on proxy *:1814
Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1:36177, id=73, length=62
       User-Name = "testing123"
       User-Password = "testing123"
       NAS-IP-Address = 255.255.255.255
       NAS-Port = 0
 Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
 modcall[authorize]: module "preprocess" returns ok for request 0
   rlm_realm: No '@' in User-Name = "testing123", looking up realm NULL
   rlm_realm: No such realm "NULL"
 modcall[authorize]: module "suffix" returns noop for request 0
 rlm_eap: No EAP-Message, not doing EAP
 modcall[authorize]: module "eap" returns noop for request 0
   users: Matched testing123 at 92
 modcall[authorize]: module "files" returns ok for request 0
modcall: group authorize returns ok for request 0
 rad_check_password: Found Auth-Type Local
auth: type Local
auth: user supplied User-Password matches local User-Password
Sending Access-Accept of id 73 to 127.0.0.1:36177
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 73 with timestamp 409d6561
Nothing to do. Sleeping until we see a request.

It seems to work so far.

I generated the certificates using the howto on
http://www.impossiblereflex.com/8021x/eap-tls-HOWTO.htm . The server name
is svr. The client user name is client1.

My /etc/raddb/clients.conf file :

client 192.168.0.0/24 {
secret = wiredlan27091957
shortname = WIREDLAN
}

client 10.0.0.0/24 {
secret = wirelesslan27091957
shortname = server1
}

My /etc/raddb/eap.conf :

eap {
default_eap_type = tls
timer_expire = 60
ignore_unknown_eap_types = no
cisco_accounting_username_bug = no
tls {
                       private_key_password = whatever
                       private_key_file = ${raddbdir}/certs/svr.pem
                       certificate_file = ${raddbdir}/certs/svr.pem
                       CA_file = ${raddbdir}/certs/root.pem
                       dh_file = ${raddbdir}/certs/dh # I generated these
two using date > filename
                       random_file = ${raddbdir}/certs/random
                       fragment_size = 1750
                       include_length = yes
}
               mschapv2 {
               }
       }

My /etc/raddb/users :

"client1" Auth-Type := EAP

"testing123" Auth-Type := Local, User-Password == "testing123"
#The rest of the file was untouched :

DEFAULT Auth-Type = System
       Fall-Through = 1
DEFAULT Service-Type == Framed-User
       Framed-IP-Address = 255.255.255.254,
       Framed-MTU = 576,
       Service-Type = Framed-User,
       Fall-Through = Yes
DEFAULT Framed-Protocol == PPP
       Framed-Protocol = PPP,
       Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "CSLIP"
       Framed-Protocol = SLIP,
       Framed-Compression = Van-Jacobson-TCP-IP
DEFAULT Hint == "SLIP"
       Framed-Protocol = SLIP

I then downloaded XSupplicant 1.0pre2 and compiled it with ./configure
--prefix=/usr/local/xsupplicant --with-ossl-root=/usr/local/ssl
--enable-card-reset (on the client), make, make install.

This version seems to look for a file /etc/xsupplicant.conf. I found an
outdated howto (if you guys help me fix this, I will write a new howto ) at
http://www.missl.cs.umd.edu/wireless/eaptls/.

I created directory /etc/1x/certs and copied over client1.pem, client1.der
and root.pem to it. These files had been generated using openssl-0.9.7d
(the version installed in /usr/local/ssl on both the server and the
client).

The contents of /etc/xsupplicant.conf :

network_list=server1,caenwireless #(let us ignore the second one for the
moment)
default_netname=server1
startup_command=<BEGIN_COMMAND>echo "XSupplicant initiated"<END_COMMAND>
first_auth_command=<BEGIN_COMMAND>/sbin/dhclient %i<END_COMMAND>
reauth_command=<BEGIN_COMMAND>echo "authenticated user %i"<END_COMMAND>
logfile=/var/log/xsupplicant.log
allow_interfaces = eth1
deny_interfaces = lo,eth0

server1{
allow_types=eap_tls
identity=<BEGIN_ID>client1<END_ID>
eap_tls{
user_cert=/etc/1x/certs/client1.der
user_key=/etc/1x/client1.pem
#user_key_pass=<BEGIN_PASS>password for key<END_PASS> # Commented out. A
little confused here - is it "whatever" (as in CA.*), or the other password
I used to generate the certificates ? This is not included in /etc/1x.conf
of the howto I listed above
root_cert=/etc/1x/certs/root.pem
chunk_size=1750
random_file=/etc/1x/random # generated using date > filename
}
}
<another network (caenwireless defined here - but it is not relevant)

It does not seem that the file /etc/1x/1x.conf is used, but I created it
anyways to cover the risk :

server1:auth = EAP
server1:id = client1
server1:root = /etc/1x/certs/root.pem
server1:cert = /etc/1x/certs/client1.der
server1:key = /etc/1x/certs/client1.pem
server1:first_auth = "/sbin/dhclient eth1"
server1:chunk_size = 1750
server1:random_file = /etc/1x/random

Now I set my essid as server1 using iwconfig on the client (the server
already has that) and tried :

#/usr/local/xsupplicant/sbin/xsupplicant eth1
Starting XSupplicant!
#

/var/log/xsupplicant.log :

Interface eth1 initialized!
An error occured binding to socket. (Error : Addresss already in use)
Couldn't initialize daemon socket!

Not surprisingly, nothing shows up on the server.

Could someone help me trace this error ?

Thanks.



Relevant Pages

  • RE: 802.1x and PEAP
    ... I disagree with your comment about TKIP and MIC being proprietary. ... Broadcast key rotation can only be done with an authentication server. ... > the TLS - thus providing the necessary security. ... > protected by the TLS session or a protected error. ...
    (Security-Basics)
  • RE: 802.1x and PEAP
    ... Broadcast key rotation can only be done with an authentication server. ... IOS a different vendors card will not work with TKIP and MIC, ... > protected by the TLS session or a protected error ...
    (Security-Basics)
  • OWA works, RPC over HTTP does not
    ... we have an Exchange 2003 server running as front end and back end server at once. ... The server is behind NAT and port 443 is forwarded to the Exchange server. ... 194.35.207.125 TLS Client Hello ...
    (microsoft.public.exchange.admin)
  • OWA works, RPC over HTTP does not
    ... we have an Exchange 2003 server running as front end and back end server at once. ... The server is behind NAT and port 443 is forwarded to the Exchange server. ... 194.35.207.125 TLS Client Hello ...
    (microsoft.public.exchange.connectivity)