EAP/TTLS Doubts (Another one!)

Mario Alberto Cruz Gartner mario.cruz at gmail.com
Tue Jun 28 00:10:52 CEST 2005


Hello!
I succesfully configured FreeRadius 1.0.4 on a FreeBSD 4.11 with a
D-LINK DI-524 to autehticate usgin EAP/TLS and certificates on client
machines.

Now, i want to try the TTLS mode. But i'm confused by some things.

So..  no certificates will be needed on the clients? First must be
open a TLS tunnel, so i think that still need the certificates. But
the TTLS doesn't bring the solution for don't mess up with PKI?

I follow the guide: http://www.alphacore.net/spipen/article.php3?id_article=4

But i was trying the securew2 client works with a username/password
instead of AEGIS client.

OK, the radius log at start-up:
---------------
metro at onebox> ./sbin/radiusd-tls -X
+ LD_LIBRARY_PATH=/usr/local/openssl/lib
+ LD_PRELOAD=/usr/local/openssl/lib/libcrypto.so
+ export LD_LIBRARY_PATH LD_PRELOAD
+ /programas/freeradius-1.0.4/sbin/radiusd -X
Starting - reading configuration files ...
reread_config:  reading radiusd.conf
Config:   including file: /programas/freeradius-1.0.4/etc/raddb/proxy.conf
Config:   including file: /programas/freeradius-1.0.4/etc/raddb/clients.conf
Config:   including file: /programas/freeradius-1.0.4/etc/raddb/snmp.conf
Config:   including file: /programas/freeradius-1.0.4/etc/raddb/eap.conf
Config:   including file: /programas/freeradius-1.0.4/etc/raddb/sql.conf
 main: prefix = "/programas/freeradius-1.0.4"
 main: localstatedir = "/programas/freeradius-1.0.4/var"
 main: logdir = "/programas/freeradius-1.0.4/var/log/radius"
 main: libdir = "/programas/freeradius-1.0.4/lib"
 main: radacctdir = "/programas/freeradius-1.0.4/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 = "/programas/freeradius-1.0.4/var/log/radius/radius.log"
 main: log_auth = no
 main: log_auth_badpass = no
 main: log_auth_goodpass = no
 main: pidfile = "/programas/freeradius-1.0.4/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 = "/programas/freeradius-1.0.4/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 /programas/freeradius-1.0.4/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 eap
 eap: default_eap_type = "tls"
 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
 gtc: challenge = "Password: "
 gtc: auth_type = "PAP"
rlm_eap: Loaded and initialized type gtc
 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 =
"/programas/freeradius-1.0.4/etc/raddb/certs/tls/cert-srv.pem"
 tls: certificate_file =
"/programas/freeradius-1.0.4/etc/raddb/certs/tls/cert-srv.pem"
 tls: CA_file = "/programas/freeradius-1.0.4/etc/raddb/certs/tls/CA/cacert.pem"
 tls: private_key_password = "whatever"
 tls: dh_file = "/programas/freeradius-1.0.4/etc/raddb/certs/tls/dh"
 tls: random_file = "/programas/freeradius-1.0.4/etc/raddb/certs/tls/random"
 tls: fragment_size = 1024
 tls: include_length = yes
 tls: check_crl = no
 tls: check_cert_cn = "(null)"
rlm_eap: Loaded and initialized type tls
 ttls: default_eap_type = "md5"
 ttls: copy_request_to_tunnel = yes
 ttls: use_tunneled_reply = yes
rlm_eap: Loaded and initialized type ttls
 mschapv2: with_ntdomain_hack = no
rlm_eap: Loaded and initialized type mschapv2
Module: Instantiated eap (eap)
Module: Loaded preprocess
 preprocess: huntgroups = "/programas/freeradius-1.0.4/etc/raddb/huntgroups"
 preprocess: hints = "/programas/freeradius-1.0.4/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 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 files
 files: usersfile = "/programas/freeradius-1.0.4/etc/raddb/users"
 files: acctusersfile = "/programas/freeradius-1.0.4/etc/raddb/acct_users"
 files: preproxy_usersfile =
"/programas/freeradius-1.0.4/etc/raddb/preproxy_users"
 files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
 detail: detailfile =
"/programas/freeradius-1.0.4/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 System
 unix: cache = no
 unix: passwd = "(null)"
 unix: shadow = "(null)"
 unix: group = "(null)"
 unix: radwtmp = "/programas/freeradius-1.0.4/var/log/radius/radwtmp"
 unix: usegroup = no
 unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded radutmp
 radutmp: filename = "/programas/freeradius-1.0.4/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.
--------------
The radius log on the auth with the securew2/wireless client:


rad_recv: Access-Request packet from host 192.168.20.7:1211, id=33, length=133
        User-Name = "metrolap"
        NAS-IP-Address = 192.168.20.7
        NAS-Port = 0
        Called-Station-Id = "00-0F-3D-36-05-87"
        Calling-Station-Id = "00-0B-7D-0F-F7-35"
        NAS-Identifier = "DI-524"
        Framed-MTU = 1380
        NAS-Port-Type = Wireless-802.11
        EAP-Message = 0x0201000d016d6574726f6c6170
        Message-Authenticator = 0xed375bf750fcd3ea4aadb70cc76ef78b
  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 = "metrolap", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 0
  rlm_eap: EAP packet type response id 1 length 13
  rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
  modcall[authorize]: module "eap" returns updated for request 0
modcall: group authorize returns updated for request 0
  rad_check_password:  Found Auth-Type EAP
auth: type "EAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 0
  rlm_eap: EAP Identity
  rlm_eap: processing type tls
 rlm_eap_tls: Requiring client certificate
  rlm_eap_tls: Initiate
  rlm_eap_tls: Start returned 1
  modcall[authenticate]: module "eap" returns handled for request 0
modcall: group authenticate returns handled for request 0
Sending Access-Challenge of id 33 to 192.168.20.7:1211
        EAP-Message = 0x010200060d20
        Message-Authenticator = 0x00000000000000000000000000000000
        State = 0x73087f91b1e8f8d957e58cac09478b25
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Access-Request packet from host 192.168.20.7:1211, id=34, length=144
        User-Name = "metrolap"
        NAS-IP-Address = 192.168.20.7
        NAS-Port = 0
        Called-Station-Id = "00-0F-3D-36-05-87"
        Calling-Station-Id = "00-0B-7D-0F-F7-35"
        NAS-Identifier = "DI-524"
        Framed-MTU = 1380
        NAS-Port-Type = Wireless-802.11
        EAP-Message = 0x020200060315
        State = 0x73087f91b1e8f8d957e58cac09478b25
        Message-Authenticator = 0xf2faf5d17f9913fd3106ec27f0341a3b
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 1
  modcall[authorize]: module "preprocess" returns ok for request 1
    rlm_realm: No '@' in User-Name = "metrolap", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 1
  rlm_eap: EAP packet type response id 2 length 6
  rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
  modcall[authorize]: module "eap" returns updated for request 1
modcall: group authorize returns updated for request 1
  rad_check_password:  Found Auth-Type EAP
auth: type "EAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 1
  rlm_eap: Request found, released from the list
  rlm_eap: EAP NAK
 rlm_eap: EAP-NAK asked for EAP-Type/ttls
  rlm_eap: processing type tls
  rlm_eap_tls: Initiate
  rlm_eap_tls: Start returned 1
  modcall[authenticate]: module "eap" returns handled for request 1
modcall: group authenticate returns handled for request 1
Sending Access-Challenge of id 34 to 192.168.20.7:1211
        EAP-Message = 0x010300061520
        Message-Authenticator = 0x00000000000000000000000000000000
        State = 0x14001116f181b54cdac28661f81bb75c
Finished request 1
Going to the next request
Waking up in 6 seconds...
rad_recv: Access-Request packet from host 192.168.20.7:1211, id=35, length=198
        User-Name = "metrolap"
        NAS-IP-Address = 192.168.20.7
        NAS-Port = 0
        Called-Station-Id = "00-0F-3D-36-05-87"
        Calling-Station-Id = "00-0B-7D-0F-F7-35"
        NAS-Identifier = "DI-524"
        Framed-MTU = 1380
        NAS-Port-Type = Wireless-802.11
        EAP-Message =
0x0203003c158000000032160301002d01000029030167011500be9cd9e84ee59487da2abab412e0a45f0781141bc0769e65c37ae49c000002000a0100
        State = 0x14001116f181b54cdac28661f81bb75c
        Message-Authenticator = 0x48f356371704be253b38cf1e4d24d0d3
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 2
  modcall[authorize]: module "preprocess" returns ok for request 2
    rlm_realm: No '@' in User-Name = "metrolap", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 2
  rlm_eap: EAP packet type response id 3 length 60
  rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
  modcall[authorize]: module "eap" returns updated for request 2
modcall: group authorize returns updated for request 2
  rad_check_password:  Found Auth-Type EAP
auth: type "EAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 2
  rlm_eap: Request found, released from the list
  rlm_eap: EAP/ttls
  rlm_eap: processing type ttls
  rlm_eap_ttls: Authenticate
  rlm_eap_tls: processing TLS
rlm_eap_tls:  Length Included
  eaptls_verify returned 11
    (other): before/accept initialization
    TLS_accept: before/accept initialization
  rlm_eap_tls: <<< TLS 1.0 Handshake [length 002d], ClientHello
    TLS_accept: SSLv3 read client hello A
  rlm_eap_tls: >>> TLS 1.0 Handshake [length 004a], ServerHello
    TLS_accept: SSLv3 write server hello A
  rlm_eap_tls: >>> TLS 1.0 Handshake [length 0662], Certificate
    TLS_accept: SSLv3 write certificate A
  rlm_eap_tls: >>> TLS 1.0 Handshake [length 0004], ServerHelloDone
    TLS_accept: SSLv3 write server done A
    TLS_accept: SSLv3 flush data
    TLS_accept:error in SSLv3 read client certificate A
In SSL Handshake Phase
In SSL Accept mode
  eaptls_process returned 13
  modcall[authenticate]: module "eap" returns handled for request 2
modcall: group authenticate returns handled for request 2
Sending Access-Challenge of id 35 to 192.168.20.7:1211
        EAP-Message =
0x0104040a15c0000006bf160301004a02000046030142c078e2643c13b1fbb273aba0a34d630c307d3df9bed6355d62ccf55d679438200ad8dc7278f815a2e681bc446183c040700e4ee612a23c822ea1927ed14bbfab000a0016030106620b00065e00065b0002c4308202c030820229a003020102020900f12ab1347a5cd9e1300d06092a864886f70d010104050030818c310b300906035504061302434f311830160603550408130f56616c6c652064656c204361756361310d300b0603550407130443616c69311e301c060355040a1315556e6976657273696461642064656c2056616c6c6531343032060355040b132b4f666963696e61206465
        EAP-Message =
0x20496e666f726d617469636120792054656c65636f6d756e69636163696f6e6573301e170d3035303632323138333932335a170d3036303632323138333932335a30819d310b300906035504061302434f311830160603550408130f56616c6c652064656c204361756361310d300b0603550407130443616c69311e301c060355040a1315556e6976657273696461642064656c2056616c6c6531343032060355040b132b4f666963696e6120646520496e666f726d617469636120792054656c65636f6d756e69636163696f6e6573310f300d060355040313066f6e65626f7830819f300d06092a864886f70d010101050003818d00308189028181
        EAP-Message =
0x00d30db19c37a7284f5f673101f2773ac3924fc774d15b7f55bc563b955b73aff9ac4f61d88aadaab244f47e944cdba13890f54008bd9ef1c553229e671ac5f4ffe6bb9bea797ac67188e37b9db3fb60006b68a8b3d01f73e9600612ae2d6bd4f0ce313e761bbdd177d9344579bd17565cc7b12a944820f52ab29365d22e4a24d30203010001a317301530130603551d25040c300a06082b06010505070301300d06092a864886f70d0101040500038181000795bf4630d57fde5f57eb8b0d4f0ceab17fd13b31437e09d666c1a5f7e3c6bc095b29442d889460764b7108194e06cc690a8b4e5ce1bc45744d57ffff07a9326ff1ac7e0d066e2cc86f83
        EAP-Message =
0x8db90cbfa1ecd56e767573304003569d1693f6cf224e9a651d9d2e78a208ce2aed4ac4f0da6187ca561c946c98d24aa0161d9bf2080003913082038d308202f6a003020102020900f12ab1347a5cd9df300d06092a864886f70d010104050030818c310b300906035504061302434f311830160603550408130f56616c6c652064656c204361756361310d300b0603550407130443616c69311e301c060355040a1315556e6976657273696461642064656c2056616c6c6531343032060355040b132b4f666963696e6120646520496e666f726d617469636120792054656c65636f6d756e69636163696f6e6573301e170d3035303632323138333631
        EAP-Message = 0x395a170d3037303632323138333631395a30818c310b
        Message-Authenticator = 0x00000000000000000000000000000000
        State = 0xddedfde893839de0b50389bdc049c9db
Finished request 2
Going to the next request
--- Walking the entire request list ---
Waking up in 4 seconds...
rad_recv: Access-Request packet from host 192.168.20.7:1211, id=36, length=144
        User-Name = "metrolap"
        NAS-IP-Address = 192.168.20.7
        NAS-Port = 0
        Called-Station-Id = "00-0F-3D-36-05-87"
        Calling-Station-Id = "00-0B-7D-0F-F7-35"
        NAS-Identifier = "DI-524"
        Framed-MTU = 1380
        NAS-Port-Type = Wireless-802.11
        EAP-Message = 0x020400061500
        State = 0xddedfde893839de0b50389bdc049c9db
        Message-Authenticator = 0x8fcef06e38748df8ff8ecb3da88c003b
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 3
  modcall[authorize]: module "preprocess" returns ok for request 3
    rlm_realm: No '@' in User-Name = "metrolap", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 3
  rlm_eap: EAP packet type response id 4 length 6
  rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
  modcall[authorize]: module "eap" returns updated for request 3
modcall: group authorize returns updated for request 3
  rad_check_password:  Found Auth-Type EAP
auth: type "EAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 3
  rlm_eap: Request found, released from the list
  rlm_eap: EAP/ttls
  rlm_eap: processing type ttls
  rlm_eap_ttls: Authenticate
  rlm_eap_tls: processing TLS
rlm_eap_tls: Received EAP-TLS ACK message
  rlm_eap_tls: ack handshake fragment handler
  eaptls_verify returned 1
  eaptls_process returned 13
  modcall[authenticate]: module "eap" returns handled for request 3
modcall: group authenticate returns handled for request 3
Sending Access-Challenge of id 36 to 192.168.20.7:1211
        EAP-Message =
0x010502c91580000006bf300906035504061302434f311830160603550408130f56616c6c652064656c204361756361310d300b0603550407130443616c69311e301c060355040a1315556e6976657273696461642064656c2056616c6c6531343032060355040b132b4f666963696e6120646520496e666f726d617469636120792054656c65636f6d756e69636163696f6e657330819f300d06092a864886f70d010101050003818d0030818902818100a4d3a6bb7f0b08a448a8b84fe5236a0ef724951374d6320389f264f2c5007aee8cfc1cfd319e16e1cb910c5cfd07821ac809e1ac9baade2e618b7addf29844732d923ca1103395642bd3f9c2
        EAP-Message =
0x30d4aaceb77b9b2e3f96436860556ece59ee48b29a57b7824847e851a6829cc9dbefe96b24e9fb66d03e368cdcd4e40c7a7b66230203010001a381f43081f1301d0603551d0e0416041433bfd1100827d8643dcde9ca1ce76b25f46446913081c10603551d230481b93081b6801433bfd1100827d8643dcde9ca1ce76b25f4644691a18192a4818f30818c310b300906035504061302434f311830160603550408130f56616c6c652064656c204361756361310d300b0603550407130443616c69311e301c060355040a1315556e6976657273696461642064656c2056616c6c6531343032060355040b132b4f666963696e6120646520496e666f726d
        EAP-Message =
0x617469636120792054656c65636f6d756e69636163696f6e6573820900f12ab1347a5cd9df300c0603551d13040530030101ff300d06092a864886f70d0101040500038181003e06154dfd6945605d183a420498b80e43472ddc37ba210af99451122c28c0f9c0fe3a8c35e5fbf834e8c9359cab9c8a5178c6e93656d1aa4a90a40114d600bdc2698199b4adb031c83633ac990f05f42244a771769d888393d4c183f71cfdbaad74a467189ae89427f68d1e55ac68320bc63370dac576cfeaa005fc9855ef5e16030100040e000000
        Message-Authenticator = 0x00000000000000000000000000000000
        State = 0xec0b973431f71a50b826c7614cef7bdc
Finished request 3
Going to the next request
--- Walking the entire request list ---
Waking up in 3 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 33 with timestamp 42c078e0
Cleaning up request 1 ID 34 with timestamp 42c078e0
Waking up in 2 seconds...
--- Walking the entire request list ---
Cleaning up request 2 ID 35 with timestamp 42c078e2
Waking up in 1 seconds...
--- Walking the entire request list ---
Cleaning up request 3 ID 36 with timestamp 42c078e3
Nothing to do.  Sleeping until we see a request.
----------------------

-What is "rlm_eap: EAP NAK"?
-It says: "TLS_accept:error in SSLv3 read client certificate A" But
the client had the certs installed already (TLS works fine!).
-Is there another guide (maybe a little updated?) for a EAP/TTLS with
FreeRadius?


I know that maybe i'm missing something obvious...
So, for any help/clue/tip/link that you could give me, THKS A LOT!




More information about the Freeradius-Users mailing list