need help - force EAP-TTLS to validate the server certificate

Klaus Laus superklausx at gmx.de
Fri Sep 17 17:00:13 CEST 2010


thanks a lot for your answer.
> Either move the "files" module before "eap", or use unlang to set it:
> 
> authorize {
>    ...
>    update control {
>      EAP-TLS-Require-Client-Cert = yes
>    }
>    eap
>    ...
> }
I did the changes in the authorize section, and freeradius seems to require the client certificate. But the server is not accept my certificate. I don't think that the certificate is bad because I can login any client with the same certificate when I use TLS instead of PEAP.
This is my way to login with PEAP on a windows xp client maybe I do anything wrong? :
I import the pksc12 certificate from the freeradius server in the windows xp certificate management. When I type certmgr.msc under "run" I can see that the certificate is successfully imported. Then I scan for the wireless networks and connect to wifix, I use PEAP with MSCHAP v.2 and type in testuser as user with the correct password.
Here you can see the debug output (freeradius did not find my certificate):

ps: thanks all for your very good help!

FreeRADIUS Version 2.1.6, for host i686-pc-linux-gnu, built on Oct 27 2009 at 17:05:49
Copyright (C) 1999-2009 The FreeRADIUS server project and contributors. 
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. 
You may redistribute copies of FreeRADIUS under the terms of the 
GNU General Public License v2. 
Starting - reading configuration files ...
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/proxy.conf
including configuration file /etc/raddb/clients.conf
including files in directory /etc/raddb/modules/
including configuration file /etc/raddb/modules/logintime
including configuration file /etc/raddb/modules/passwd
including configuration file /etc/raddb/modules/attr_rewrite
including configuration file /etc/raddb/modules/ippool
including configuration file /etc/raddb/modules/radutmp
including configuration file /etc/raddb/modules/acct_unique
including configuration file /etc/raddb/modules/sql_log
including configuration file /etc/raddb/modules/checkval
including configuration file /etc/raddb/modules/krb5
including configuration file /etc/raddb/modules/smbpasswd
including configuration file /etc/raddb/modules/otp
including configuration file /etc/raddb/modules/inner-eap
including configuration file /etc/raddb/modules/expr
including configuration file /etc/raddb/modules/perl
including configuration file /etc/raddb/modules/expiration
including configuration file /etc/raddb/modules/ldap
including configuration file /etc/raddb/modules/pap
including configuration file /etc/raddb/modules/mac2vlan
including configuration file /etc/raddb/modules/echo
including configuration file /etc/raddb/modules/attr_filter
including configuration file /etc/raddb/modules/unix
including configuration file /etc/raddb/modules/linelog
including configuration file /etc/raddb/modules/chap
including configuration file /etc/raddb/modules/policy
including configuration file /etc/raddb/modules/detail.example.com
including configuration file /etc/raddb/modules/preprocess
including configuration file /etc/raddb/modules/realm
including configuration file /etc/raddb/modules/files
including configuration file /etc/raddb/modules/detail.log
including configuration file /etc/raddb/modules/detail
including configuration file /etc/raddb/modules/wimax
including configuration file /etc/raddb/modules/sradutmp
including configuration file /etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /etc/raddb/modules/etc_group
including configuration file /etc/raddb/modules/mac2ip
including configuration file /etc/raddb/modules/always
including configuration file /etc/raddb/modules/mschap
including configuration file /etc/raddb/modules/counter
including configuration file /etc/raddb/modules/smsotp
including configuration file /etc/raddb/modules/pam
including configuration file /etc/raddb/modules/exec
including configuration file /etc/raddb/modules/digest
including configuration file /etc/raddb/eap.conf
including configuration file /etc/raddb/policy.conf
including files in directory /etc/raddb/sites-enabled/
including configuration file /etc/raddb/sites-enabled/default
including configuration file /etc/raddb/sites-enabled/control-socket
including configuration file /etc/raddb/sites-enabled/inner-tunnel
group = radiusd
user = radiusd
including dictionary file /etc/raddb/dictionary
main {
	prefix = "/usr"
	localstatedir = "/var"
	logdir = "/var/log/radius"
	libdir = "/usr/lib/freeradius"
	radacctdir = "/var/log/radius/radacct"
	hostname_lookups = no
	max_request_time = 30
	cleanup_delay = 5
	max_requests = 1024
	allow_core_dumps = no
	pidfile = "/var/run/radiusd/radiusd.pid"
	checkrad = "/usr/sbin/checkrad"
	debug_level = 0
	proxy_requests = yes
 log {
	stripped_names = no
	auth = no
	auth_badpass = no
	auth_goodpass = no
 }
 security {
	max_attributes = 200
	reject_delay = 1
	status_server = yes
 }
}
radiusd: #### Loading Realms and Home Servers ####
 proxy server {
	retry_delay = 5
	retry_count = 3
	default_fallback = no
	dead_time = 120
	wake_all_if_all_dead = no
 }
 home_server localhost {
	ipaddr = 127.0.0.1
	port = 1812
	type = "auth"
	secret = "testing123"
	response_window = 20
	max_outstanding = 65536
	require_message_authenticator = no
	zombie_period = 40
	status_check = "status-server"
	ping_interval = 30
	check_interval = 30
	num_answers_to_alive = 3
	num_pings_to_alive = 3
	revive_interval = 120
	status_check_timeout = 4
	irt = 2
	mrt = 16
	mrc = 5
	mrd = 30
 }
 home_server_pool my_auth_failover {
	type = fail-over
	home_server = localhost
 }
 realm example.com {
	auth_pool = my_auth_failover
 }
 realm LOCAL {
 }
radiusd: #### Loading Clients ####
 client localhost {
	ipaddr = 127.0.0.1
	require_message_authenticator = no
	secret = "testing123"
	nastype = "other"
 }
 client 10.65.100.50 {
	require_message_authenticator = no
	secret = "xxxxxxx"
	nastype = "other"
 }
radiusd: #### Instantiating modules ####
 instantiate {
 Module: Linked to module rlm_exec
 Module: Instantiating exec
  exec {
	wait = no
	input_pairs = "request"
	shell_escape = yes
  }
 Module: Linked to module rlm_expr
 Module: Instantiating expr
 Module: Linked to module rlm_expiration
 Module: Instantiating expiration
  expiration {
	reply-message = "Password Has Expired  "
  }
 Module: Linked to module rlm_logintime
 Module: Instantiating logintime
  logintime {
	reply-message = "You are calling outside your allowed timespan  "
	minimum-timeout = 60
  }
 }
radiusd: #### Loading Virtual Servers ####
server inner-tunnel {
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Linked to module rlm_pap
 Module: Instantiating pap
  pap {
	encryption_scheme = "auto"
	auto_header = no
  }
 Module: Linked to module rlm_chap
 Module: Instantiating chap
 Module: Linked to module rlm_mschap
 Module: Instantiating mschap
  mschap {
	use_mppe = yes
	require_encryption = no
	require_strong = no
	with_ntdomain_hack = no
  }
 Module: Linked to module rlm_unix
 Module: Instantiating unix
  unix {
	radwtmp = "/var/log/radius/radwtmp"
  }
 Module: Linked to module rlm_eap
 Module: Instantiating eap
  eap {
	default_eap_type = "md5"
	timer_expire = 60
	ignore_unknown_eap_types = no
	cisco_accounting_username_bug = no
	max_sessions = 2048
  }
 Module: Linked to sub-module rlm_eap_md5
 Module: Instantiating eap-md5
 Module: Linked to sub-module rlm_eap_leap
 Module: Instantiating eap-leap
 Module: Linked to sub-module rlm_eap_gtc
 Module: Instantiating eap-gtc
   gtc {
	challenge = "Password: "
	auth_type = "PAP"
   }
 Module: Linked to sub-module rlm_eap_tls
 Module: Instantiating eap-tls
   tls {
	rsa_key_exchange = no
	dh_key_exchange = yes
	rsa_key_length = 512
	dh_key_length = 512
	verify_depth = 0
	CA_path = "/etc/ssl"
	pem_file_type = yes
	private_key_file = "/etc/ssl/serverkey.pem"
	certificate_file = "/etc/ssl/servercert.pem"
	CA_file = "/etc/ssl/cacert.pem"
	private_key_password = "xxxxxx"
	dh_file = "/etc/ssl/dh"
	random_file = "/etc/ssl/random"
	fragment_size = 1024
	include_length = yes
	check_crl = no
	cipher_list = "DEFAULT"
    cache {
	enable = no
	lifetime = 24
	max_entries = 255
    }
   }
 Module: Linked to sub-module rlm_eap_ttls
 Module: Instantiating eap-ttls
   ttls {
	default_eap_type = "md5"
	copy_request_to_tunnel = no
	use_tunneled_reply = no
	virtual_server = "inner-tunnel"
	include_length = yes
   }
 Module: Linked to sub-module rlm_eap_peap
 Module: Instantiating eap-peap
   peap {
	default_eap_type = "mschapv2"
	copy_request_to_tunnel = no
	use_tunneled_reply = no
	proxy_tunneled_request_as_eap = yes
	virtual_server = "inner-tunnel"
   }
 Module: Linked to sub-module rlm_eap_mschapv2
 Module: Instantiating eap-mschapv2
   mschapv2 {
	with_ntdomain_hack = no
   }
 Module: Checking authorize {...} for more modules to load
 Module: Linked to module rlm_realm
 Module: Instantiating suffix
  realm suffix {
	format = "suffix"
	delimiter = "@"
	ignore_default = no
	ignore_null = no
  }
 Module: Linked to module rlm_files
 Module: Instantiating files
  files {
	usersfile = "/etc/raddb/users"
	acctusersfile = "/etc/raddb/acct_users"
	preproxy_usersfile = "/etc/raddb/preproxy_users"
	compat = "no"
  }
 Module: Checking session {...} for more modules to load
 Module: Linked to module rlm_radutmp
 Module: Instantiating radutmp
  radutmp {
	filename = "/var/log/radius/radutmp"
	username = "%{User-Name}"
	case_sensitive = yes
	check_with_nas = yes
	perm = 384
	callerid = yes
  }
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 Module: Linked to module rlm_attr_filter
 Module: Instantiating attr_filter.access_reject
  attr_filter attr_filter.access_reject {
	attrsfile = "/etc/raddb/attrs.access_reject"
	key = "%{User-Name}"
  }
 } # modules
} # server
server {
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Checking authorize {...} for more modules to load
 Module: Checking preacct {...} for more modules to load
 Module: Linked to module rlm_preprocess
 Module: Instantiating preprocess
  preprocess {
	huntgroups = "/etc/raddb/huntgroups"
	hints = "/etc/raddb/hints"
	with_ascend_hack = no
	ascend_channels_per_line = 23
	with_ntdomain_hack = no
	with_specialix_jetstream_hack = no
	with_cisco_vsa_hack = no
	with_alvarion_vsa_hack = no
  }
 Module: Linked to module rlm_acct_unique
 Module: Instantiating acct_unique
  acct_unique {
	key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
  }
 Module: Checking accounting {...} for more modules to load
 Module: Linked to module rlm_detail
 Module: Instantiating detail
  detail {
	detailfile = "/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
	header = "%t"
	detailperm = 384
	dirperm = 493
	locking = no
	log_packet_header = no
  }
 Module: Instantiating attr_filter.accounting_response
  attr_filter attr_filter.accounting_response {
	attrsfile = "/etc/raddb/attrs.accounting_response"
	key = "%{User-Name}"
  }
 Module: Checking session {...} for more modules to load
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 } # modules
} # server
radiusd: #### Opening IP addresses and Ports ####
listen {
	type = "auth"
	ipaddr = *
	port = 0
}
listen {
	type = "acct"
	ipaddr = *
	port = 0
}
listen {
	type = "control"
 listen {
	socket = "/var/run/radiusd/radiusd.sock"
 }
}
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /var/run/radiusd/radiusd.sock
Listening on proxy address * port 1814
Ready to process requests.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=4, length=144
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x02010008016b6d61
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0xdf87e897b86f8e557482d2f53afa6ff0
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 1 length 8
[eap] No EAP Start, assuming it's an on-going EAP conversation
++[eap] returns updated
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] EAP Identity
[eap] processing type md5
rlm_eap_md5: Issuing Challenge
++[eap] returns handled
Sending Access-Challenge of id 4 to 10.65.100.50 port 32791
	EAP-Message = 0x010200160410f37f3bcfebbe041e2a403ab75ec215a0
	Message-Authenticator = 0x00000000000000000000000000000000
	State = 0x3f25f9043f27fd753b744dff47904da8
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=5, length=160
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x020200060319
	State = 0x3f25f9043f27fd753b744dff47904da8
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0xd10a979c71dba5fb0a02910e4cc5e02b
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 2 length 6
[eap] No EAP Start, assuming it's an on-going EAP conversation
++[eap] returns updated
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] Request found, released from the list
[eap] EAP NAK
[eap] EAP-NAK asked for EAP-Type/peap
[eap] processing type tls
[tls] Requiring client certificate
[tls] Initiate
[tls] Start returned 1
++[eap] returns handled
Sending Access-Challenge of id 5 to 10.65.100.50 port 32791
	EAP-Message = 0x010300061920
	Message-Authenticator = 0x00000000000000000000000000000000
	State = 0x3f25f9043e26e0753b744dff47904da8
Finished request 1.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=6, length=266
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x0203007019800000006616030100610100005d03014c937b013fe3fcdf2f6c35cdf0b04b888403ed76762d64222568bba2a2e567b900003600390038003500160013000a00330032002f0007006600050004006300620061001500120009006500640060001400110008000600030100
	State = 0x3f25f9043e26e0753b744dff47904da8
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0xd8805572f26df2cb8db8d6f234cbedc7
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 3 length 112
[eap] Continuing tunnel setup.
++[eap] returns ok
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] Request found, released from the list
[eap] EAP/peap
[eap] processing type peap
[peap] processing EAP-TLS
  TLS Length 102
[peap] Length Included
[peap] eaptls_verify returned 11 
[peap]     (other): before/accept initialization 
[peap]     TLS_accept: before/accept initialization 
[peap] <<< TLS 1.0 Handshake [length 0061], ClientHello  
[peap]     TLS_accept: SSLv3 read client hello A 
[peap] >>> TLS 1.0 Handshake [length 002a], ServerHello  
[peap]     TLS_accept: SSLv3 write server hello A 
[peap] >>> TLS 1.0 Handshake [length 0831], Certificate  
[peap]     TLS_accept: SSLv3 write certificate A 
[peap] >>> TLS 1.0 Handshake [length 018d], ServerKeyExchange  
[peap]     TLS_accept: SSLv3 write key exchange A 
[peap] >>> TLS 1.0 Handshake [length 0088], CertificateRequest  
[peap]     TLS_accept: SSLv3 write certificate request A 
[peap]     TLS_accept: SSLv3 flush data 
[peap]     TLS_accept: Need to read more data: SSLv3 read client certificate A
In SSL Handshake Phase 
In SSL Accept mode  
[peap] eaptls_process returned 13 
[peap] EAPTLS_HANDLED
++[eap] returns handled
Sending Access-Challenge of id 6 to 10.65.100.50 port 32791
	EAP-Message = 0x0104040019c000000a84160301002a0200002603014c937aeba2a256b0dc1c42dcff73663767bb53421fbe42c572bb8c76699cf9860000390016030108310b00082d00082a0003db308203d7308202bfa003020102020101300d06092a864886f70d01010505003074310b3009060355040613024445311b301906035504081312426164656e2d577565727474656d626572673111300f060355040713084672656962757267311c301a060355040a13135361757465722d43756d756c757320476d6248311730150603550403130e4d6172636f204b616c6d62616368301e170d3130303930363137313335325a170d3131303930363137313335325a
	EAP-Message = 0x306d310b3009060355040613024445311b301906035504081312426164656e2d577565727474656d62657267311c301a060355040a13135361757465722d43756d756c757320476d6248312330210603550403131a726164697573746573742e667262672e7361757465722e636f6d30820122300d06092a864886f70d01010105000382010f003082010a0282010100af7258cb0537e6dc5195e17615d9f12b7812f3a8b42d92c5961a6c0509fbb11515ee6dc9026933b45805fd11ca4ab771fdba2ed701ac9dba9d6a2582732be86a85198bd6264934f4fc3e886188ae79025d67aa1b654ee1f7888872ffba1fcf2008e7c6a20b0a9d3ef161414849
	EAP-Message = 0x22593f76ebc38c2dc6ebe26d3a1d23b68cf1aebf164f9ac7d78dc8ca94357fdec227751be1a547c09c267b6bf5108d3f22e09d468754de49778e1dc75c4427dbe08db6fe8f9f1c3f64f4650cd1abb96922adc5beaeb50ffa6be76c2ae9fe1cea02e73df394411ff98be4239f2df447b9c2c1380e11afe8880269f0e8e5ab72c7ec6e87ce1c95fef3e832d8f9ac12f86c93925f0203010001a37b307930090603551d1304023000302c06096086480186f842010d041f161d4f70656e53534c2047656e657261746564204365727469666963617465301d0603551d0e041604145ba25c767b248d2d0e6a5ac498880878c7723124301f0603551d230418
	EAP-Message = 0x301680147eceb96deb6bd80d6d82a6691ea4d9e2c4cb4202300d06092a864886f70d010105050003820101006eb0bceb3c4bb3a837c380193e2024222e69e46a422e8740bb9d0ec7047bcd490333edf5b6078950755953f8a10dc643d89af6f82e92a359a79646d84cf51a1f38fca53b81706916df56ad70c3f6facdad7a88c84845bb4b347e03323bc3d02cb19c93016cf4866936dc4d71677bf04868a4aa4169e066e599dad72933da3645439e6657c828f0581318ee04aa3ff41acec2857c291e1e5c0ed9fe22dd23f9752a0cb04c589c2d265cd90ed25604d255979680f0c84f3d107d5f36bff0417aad0ad31d1b44a88f5682bb6fd1408d95e8f8
	EAP-Message = 0xcbda6c00dccba82a9fab719b
	Message-Authenticator = 0x00000000000000000000000000000000
	State = 0x3f25f9043d21e0753b744dff47904da8
Finished request 2.
Going to the next request
Waking up in 4.7 seconds.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=7, length=160
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x020400061900
	State = 0x3f25f9043d21e0753b744dff47904da8
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0x7de72c3ae969feb8b5f0ca7d28228832
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 4 length 6
[eap] Continuing tunnel setup.
++[eap] returns ok
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] Request found, released from the list
[eap] EAP/peap
[eap] processing type peap
[peap] processing EAP-TLS
[peap] Received TLS ACK
[peap] ACK handshake fragment handler
[peap] eaptls_verify returned 1 
[peap] eaptls_process returned 13 
[peap] EAPTLS_HANDLED
++[eap] returns handled
Sending Access-Challenge of id 7 to 10.65.100.50 port 32791
	EAP-Message = 0x010503fc1940e8785b175d14862f674bda7be53d94083dc02e24490637868a52901d27f1e314e19547000449308204453082032da003020102020900d13a98af8d2d2682300d06092a864886f70d01010505003074310b3009060355040613024445311b301906035504081312426164656e2d577565727474656d626572673111300f060355040713084672656962757267311c301a060355040a13135361757465722d43756d756c757320476d6248311730150603550403130e4d6172636f204b616c6d62616368301e170d3130303930363136353335355a170d3131303930363136353335355a3074310b3009060355040613024445311b301906
	EAP-Message = 0x035504081312426164656e2d577565727474656d626572673111300f060355040713084672656962757267311c301a060355040a13135361757465722d43756d756c757320476d6248311730150603550403130e4d6172636f204b616c6d6261636830820122300d06092a864886f70d01010105000382010f003082010a0282010100da0bb9ea3edf1a4254c2255396719d84e64d3034a1969e52fbe487bb084b2f257c7bbd2a012715bf9401acac43284f7950a915223d44a81ae5cd6d2cc6d9f00bca4d097896d86012edf9a6ddccfa9466e58773fc9506d2227a76c242d361e2367f122b4a6f87fc82952604f1df78ef3971b23d96ee1d3a9d523c
	EAP-Message = 0xd77d5cdafcba00909b8c89b4c3da27f52095816f75fb9f5aab6ff92cfd06ed0e72fcf7aaf6b67e2ff8d925f023d5c9e8aef68453cbf49bd2f60364520ffcb13fa0943f1ced1f9797520654bedab6670ed41d77499da10a9fd13af6fd8da181cf88c3cdaf6e53b3275ea6a5b4c59c3f001484b1e4a4ab080407f5c42a4a082970853e0aeaa6250203010001a381d93081d6301d0603551d0e041604147eceb96deb6bd80d6d82a6691ea4d9e2c4cb42023081a60603551d2304819e30819b80147eceb96deb6bd80d6d82a6691ea4d9e2c4cb4202a178a4763074310b3009060355040613024445311b301906035504081312426164656e2d5775657274
	EAP-Message = 0x74656d626572673111300f060355040713084672656962757267311c301a060355040a13135361757465722d43756d756c757320476d6248311730150603550403130e4d6172636f204b616c6d62616368820900d13a98af8d2d2682300c0603551d13040530030101ff300d06092a864886f70d010105050003820101007327a25a47ad3b89c6d83501e69b3c7a4a8f4fe2e17ad0f6544608ba61f9e0821678f37a1c9639a427f471c478f46bec7c9f69a30e39a88f3d1936df0b1bdf07661bb2a000acb2d4fa79a5e03c86de62a3f64506491fa2bad8748afd18420fdfec81d23501d15fdc86b4fbb8e9c931b0443c51171c294815b5838379e0953f
	EAP-Message = 0x59589be19952b366
	Message-Authenticator = 0x00000000000000000000000000000000
	State = 0x3f25f9043c20e0753b744dff47904da8
Finished request 3.
Going to the next request
Waking up in 4.7 seconds.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=8, length=160
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x020500061900
	State = 0x3f25f9043c20e0753b744dff47904da8
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0x5350cc86ad25169c3c750d66e27a7a87
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 5 length 6
[eap] Continuing tunnel setup.
++[eap] returns ok
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] Request found, released from the list
[eap] EAP/peap
[eap] processing type peap
[peap] processing EAP-TLS
[peap] Received TLS ACK
[peap] ACK handshake fragment handler
[peap] eaptls_verify returned 1 
[peap] eaptls_process returned 13 
[peap] EAPTLS_HANDLED
++[eap] returns handled
Sending Access-Challenge of id 8 to 10.65.100.50 port 32791
	EAP-Message = 0x0106029e1900aeeae728dc66b68e1d8a309139e376e0f60d810a7505266b4b94988e4b1ceedae8898a667d8f04706261a0e8a08fabe186dde88221a3d58bec54e1ab5e5978bef73257f30637509ea41c24363c7f92d9af8eeb9ad24d11cd27824b1ec1e01f2821054184f28a596d23d14d50a928c180c782919b58273058f6160301018d0c0001890040dd176c46152fe3c986afa59e242da816936065e55afc075caad17d1a554fa9185954096f6eb07311af328409df210464d11d1280d5cb083a2a09de1eca09bc1f000105004055311a5874c6e2b72f961e668c6b3d2d601b9e6c36fa6315071d69e8c5138a3851327f2de71b320c924b04d10069
	EAP-Message = 0xc65cb7bcb9c577f35991aa38aa19aa4906c601004d1186b953e90603a1826fd3e48b6dc487d3fd5451923e97dd9dc9e5b4e9485940eb47f64c2d54e2a4998f5b0a56766ee64ce2cc9f677a1e0dec6fa0b990bc6717f48981b2ec4e3b35ef56c29763c5505c9fc1014c31923a439e20a16b49f9812bab931d0eb5f862dd274124d3e067d63fe9303a61a7e37d51d18ed0521b6dbd12184e46ca95f30cefd9f94e29bf2cd28babb6a56f03a111ecfea8eb7b6ebf8ffc55871f3ad45fb5edd5a1cc0c12b9b4223489574cb45f4268662fa805844acf1b080b88760edfa6f1198814ab12a2e87262245ed54b9a634f14743e83aa4edb1219fec8815e9a01ca
	EAP-Message = 0xf5699d21162364c1ebc9a42d907af3559344c46a17418316030100880d000080050304010240007800763074310b3009060355040613024445311b301906035504081312426164656e2d577565727474656d626572673111300f060355040713084672656962757267311c301a060355040a13135361757465722d43756d756c757320476d6248311730150603550403130e4d6172636f204b616c6d626163680e000000
	Message-Authenticator = 0x00000000000000000000000000000000
	State = 0x3f25f9043b23e0753b744dff47904da8
Finished request 4.
Going to the next request
Waking up in 4.7 seconds.
rad_recv: Access-Request packet from host 10.65.100.50 port 32791, id=9, length=310
	User-Name = "testuser"
	NAS-IP-Address = 10.65.100.50
	NAS-Identifier = "other"
	NAS-Port = 1
	NAS-Port-Type = Wireless-802.11
	Calling-Station-Id = "0022FB1D434E"
	Called-Station-Id = "001B2F249FE0"
	Service-Type = Login-User
	Framed-MTU = 1100
	EAP-Message = 0x0206009c19800000009216030100070b0000030000001603010046100000420040d2f3945de07408d38befe9ee2604880eeff1ed35718731b387080e2941942cbb8fe43238881d111b1a36a020e5c21a5739c9d0a66c3c955cc84baeb3138f2b0914030100010116030100308cf41a7573c4ad40a8161b748b11fa3a9888e0fa13c3d2f41cc6a7703902fa736455ce112c2951d5fe166af5041d8294
	State = 0x3f25f9043b23e0753b744dff47904da8
	Aruba-Essid-Name = "wifix"
	Aruba-Location-Id = "1.1.1"
	Message-Authenticator = 0x0aa542dcaac69b04c228e15d97addc5a
+- entering group authorize {...}
++[control] returns notfound
[eap] EAP packet type response id 6 length 156
[eap] Continuing tunnel setup.
++[eap] returns ok
Found Auth-Type = EAP
+- entering group authenticate {...}
[eap] Request found, released from the list
[eap] EAP/peap
[eap] processing type peap
[peap] processing EAP-TLS
  TLS Length 146
[peap] Length Included
[peap] eaptls_verify returned 11 
[peap] <<< TLS 1.0 Handshake [length 0007], Certificate  
[peap] >>> TLS 1.0 Alert [length 0002], fatal handshake_failure  
TLS Alert write:fatal:handshake failure 
    TLS_accept:error in SSLv3 read client certificate B 
rlm_eap: SSL error error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate
SSL: SSL_read failed in a system call (-1), TLS session fails.
TLS receive handshake failed during operation
[peap] eaptls_process returned 4 
[peap] EAPTLS_OTHERS
[eap] Handler failed in EAP/peap
[eap] Failed in EAP select
++[eap] returns invalid
Failed to authenticate the user.
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject] 	expand: %{User-Name} -> testuser
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 5 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 5
Sending Access-Reject of id 9 to 10.65.100.50 port 32791
	EAP-Message = 0x04060004
	Message-Authenticator = 0x00000000000000000000000000000000
Waking up in 3.7 seconds.
Cleaning up request 0 ID 4 with timestamp +16
Cleaning up request 1 ID 5 with timestamp +16
Waking up in 0.2 seconds.
Cleaning up request 2 ID 6 with timestamp +16
Cleaning up request 3 ID 7 with timestamp +16
Cleaning up request 4 ID 8 with timestamp +16
Waking up in 1.0 seconds.
Cleaning up request 5 ID 9 with timestamp +16
Ready to process requests.




-------- Original-Nachricht --------
> Datum: Thu, 16 Sep 2010 15:35:54 +0100
> Von: Phil Mayers <p.mayers at imperial.ac.uk>
> An: freeradius-users at lists.freeradius.org
> Betreff: Re: need help - force EAP-TTLS to validate the server certificate

> On 16/09/10 14:35, Klaus Laus wrote:
> > ok, this is the debug output:
> >
> > FreeRADIUS Version 2.1.6, for host i686-pc-linux-gnu, built on Oct 27
> 2009 at 17:05:49
> > Copyright (C) 1999-2009 The FreeRADIUS server project and contributors.
> > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> > PARTICULAR PURPOSE.
> > You may redistribute copies of FreeRADIUS under the terms of the
> > GNU General Public License v2.
> > Starting - reading configuration files ...
> > including configuration file /etc/raddb/radiusd.conf
> > including configuration file /etc/raddb/proxy.conf
> > including configuration file /etc/raddb/clients.conf
> > including files in directory /etc/raddb/modules/
> > including configuration file /etc/raddb/modules/logintime
> > including configuration file /etc/raddb/modules/passwd
> > including configuration file /etc/raddb/modules/attr_rewrite
> > including configuration file /etc/raddb/modules/ippool
> > including configuration file /etc/raddb/modules/radutmp
> > including configuration file /etc/raddb/modules/acct_unique
> > including configuration file /etc/raddb/modules/sql_log
> > including configuration file /etc/raddb/modules/checkval
> > including configuration file /etc/raddb/modules/krb5
> > including configuration file /etc/raddb/modules/smbpasswd
> > including configuration file /etc/raddb/modules/otp
> > including configuration file /etc/raddb/modules/inner-eap
> > including configuration file /etc/raddb/modules/expr
> > including configuration file /etc/raddb/modules/perl
> > including configuration file /etc/raddb/modules/expiration
> > including configuration file /etc/raddb/modules/ldap
> > including configuration file /etc/raddb/modules/pap
> > including configuration file /etc/raddb/modules/mac2vlan
> > including configuration file /etc/raddb/modules/echo
> > including configuration file /etc/raddb/modules/attr_filter
> > including configuration file /etc/raddb/modules/unix
> > including configuration file /etc/raddb/modules/linelog
> > including configuration file /etc/raddb/modules/chap
> > including configuration file /etc/raddb/modules/policy
> > including configuration file /etc/raddb/modules/detail.example.com
> > including configuration file /etc/raddb/modules/preprocess
> > including configuration file /etc/raddb/modules/realm
> > including configuration file /etc/raddb/modules/files
> > including configuration file /etc/raddb/modules/detail.log
> > including configuration file /etc/raddb/modules/detail
> > including configuration file /etc/raddb/modules/wimax
> > including configuration file /etc/raddb/modules/sradutmp
> > including configuration file
> /etc/raddb/modules/sqlcounter_expire_on_login
> > including configuration file /etc/raddb/modules/etc_group
> > including configuration file /etc/raddb/modules/mac2ip
> > including configuration file /etc/raddb/modules/always
> > including configuration file /etc/raddb/modules/mschap
> > including configuration file /etc/raddb/modules/counter
> > including configuration file /etc/raddb/modules/smsotp
> > including configuration file /etc/raddb/modules/pam
> > including configuration file /etc/raddb/modules/exec
> > including configuration file /etc/raddb/modules/digest
> > including configuration file /etc/raddb/eap.conf
> > including configuration file /etc/raddb/policy.conf
> > including files in directory /etc/raddb/sites-enabled/
> > including configuration file /etc/raddb/sites-enabled/default
> > including configuration file /etc/raddb/sites-enabled/control-socket
> > including configuration file /etc/raddb/sites-enabled/inner-tunnel
> > group = radiusd
> > user = radiusd
> > including dictionary file /etc/raddb/dictionary
> > main {
> >          prefix = "/usr"
> >          localstatedir = "/var"
> >          logdir = "/var/log/radius"
> >          libdir = "/usr/lib/freeradius"
> >          radacctdir = "/var/log/radius/radacct"
> >          hostname_lookups = no
> >          max_request_time = 30
> >          cleanup_delay = 5
> >          max_requests = 1024
> >          allow_core_dumps = no
> >          pidfile = "/var/run/radiusd/radiusd.pid"
> >          checkrad = "/usr/sbin/checkrad"
> >          debug_level = 0
> >          proxy_requests = yes
> >   log {
> >          stripped_names = no
> >          auth = no
> >          auth_badpass = no
> >          auth_goodpass = no
> >   }
> >   security {
> >          max_attributes = 200
> >          reject_delay = 1
> >          status_server = yes
> >   }
> > }
> > radiusd: #### Loading Realms and Home Servers ####
> >   proxy server {
> >          retry_delay = 5
> >          retry_count = 3
> >          default_fallback = no
> >          dead_time = 120
> >          wake_all_if_all_dead = no
> >   }
> >   home_server localhost {
> >          ipaddr = 127.0.0.1
> >          port = 1812
> >          type = "auth"
> >          secret = "testing123"
> >          response_window = 20
> >          max_outstanding = 65536
> >          require_message_authenticator = no
> >          zombie_period = 40
> >          status_check = "status-server"
> >          ping_interval = 30
> >          check_interval = 30
> >          num_answers_to_alive = 3
> >          num_pings_to_alive = 3
> >          revive_interval = 120
> >          status_check_timeout = 4
> >          irt = 2
> >          mrt = 16
> >          mrc = 5
> >          mrd = 30
> >   }
> >   home_server_pool my_auth_failover {
> >          type = fail-over
> >          home_server = localhost
> >   }
> >   realm example.com {
> >          auth_pool = my_auth_failover
> >   }
> >   realm LOCAL {
> >   }
> > radiusd: #### Loading Clients ####
> >   client localhost {
> >          ipaddr = 127.0.0.1
> >          require_message_authenticator = no
> >          secret = "testing123"
> >          nastype = "other"
> >   }
> >   client 10.65.100.50 {
> >          require_message_authenticator = no
> >          secret = "xxxxxxxx"
> >          nastype = "other"
> >   }
> > radiusd: #### Instantiating modules ####
> >   instantiate {
> >   Module: Linked to module rlm_exec
> >   Module: Instantiating exec
> >    exec {
> >          wait = no
> >          input_pairs = "request"
> >          shell_escape = yes
> >    }
> >   Module: Linked to module rlm_expr
> >   Module: Instantiating expr
> >   Module: Linked to module rlm_expiration
> >   Module: Instantiating expiration
> >    expiration {
> >          reply-message = "Password Has Expired  "
> >    }
> >   Module: Linked to module rlm_logintime
> >   Module: Instantiating logintime
> >    logintime {
> >          reply-message = "You are calling outside your allowed timespan 
> "
> >          minimum-timeout = 60
> >    }
> >   }
> > radiusd: #### Loading Virtual Servers ####
> > server inner-tunnel {
> >   modules {
> >   Module: Checking authenticate {...} for more modules to load
> >   Module: Linked to module rlm_pap
> >   Module: Instantiating pap
> >    pap {
> >          encryption_scheme = "auto"
> >          auto_header = no
> >    }
> >   Module: Linked to module rlm_chap
> >   Module: Instantiating chap
> >   Module: Linked to module rlm_mschap
> >   Module: Instantiating mschap
> >    mschap {
> >          use_mppe = yes
> >          require_encryption = no
> >          require_strong = no
> >          with_ntdomain_hack = no
> >    }
> >   Module: Linked to module rlm_unix
> >   Module: Instantiating unix
> >    unix {
> >          radwtmp = "/var/log/radius/radwtmp"
> >    }
> >   Module: Linked to module rlm_eap
> >   Module: Instantiating eap
> >    eap {
> >          default_eap_type = "md5"
> >          timer_expire = 60
> >          ignore_unknown_eap_types = no
> >          cisco_accounting_username_bug = no
> >          max_sessions = 2048
> >    }
> >   Module: Linked to sub-module rlm_eap_md5
> >   Module: Instantiating eap-md5
> >   Module: Linked to sub-module rlm_eap_leap
> >   Module: Instantiating eap-leap
> >   Module: Linked to sub-module rlm_eap_gtc
> >   Module: Instantiating eap-gtc
> >     gtc {
> >          challenge = "Password: "
> >          auth_type = "PAP"
> >     }
> >   Module: Linked to sub-module rlm_eap_tls
> >   Module: Instantiating eap-tls
> >     tls {
> >          rsa_key_exchange = no
> >          dh_key_exchange = yes
> >          rsa_key_length = 512
> >          dh_key_length = 512
> >          verify_depth = 0
> >          CA_path = "/etc/ssl"
> >          pem_file_type = yes
> >          private_key_file = "/etc/ssl/serverkey.pem"
> >          certificate_file = "/etc/ssl/servercert.pem"
> >          CA_file = "/etc/ssl/cacert.pem"
> >          private_key_password = "xxxxxxxxx"
> >          dh_file = "/etc/ssl/dh"
> >          random_file = "/etc/ssl/random"
> >          fragment_size = 1024
> >          include_length = yes
> >          check_crl = no
> >          cipher_list = "DEFAULT"
> >      cache {
> >          enable = no
> >          lifetime = 24
> >          max_entries = 255
> >      }
> >     }
> >   Module: Linked to sub-module rlm_eap_ttls
> >   Module: Instantiating eap-ttls
> >     ttls {
> >          default_eap_type = "md5"
> >          copy_request_to_tunnel = no
> >          use_tunneled_reply = no
> >          virtual_server = "inner-tunnel"
> >          include_length = yes
> >     }
> >   Module: Linked to sub-module rlm_eap_peap
> >   Module: Instantiating eap-peap
> >     peap {
> >          default_eap_type = "mschapv2"
> >          copy_request_to_tunnel = no
> >          use_tunneled_reply = no
> >          proxy_tunneled_request_as_eap = yes
> >          virtual_server = "inner-tunnel"
> >     }
> >   Module: Linked to sub-module rlm_eap_mschapv2
> >   Module: Instantiating eap-mschapv2
> >     mschapv2 {
> >          with_ntdomain_hack = no
> >     }
> >   Module: Checking authorize {...} for more modules to load
> >   Module: Linked to module rlm_realm
> >   Module: Instantiating suffix
> >    realm suffix {
> >          format = "suffix"
> >          delimiter = "@"
> >          ignore_default = no
> >          ignore_null = no
> >    }
> >   Module: Linked to module rlm_files
> >   Module: Instantiating files
> >    files {
> >          usersfile = "/etc/raddb/users"
> >          acctusersfile = "/etc/raddb/acct_users"
> >          preproxy_usersfile = "/etc/raddb/preproxy_users"
> >          compat = "no"
> >    }
> >   Module: Checking session {...} for more modules to load
> >   Module: Linked to module rlm_radutmp
> >   Module: Instantiating radutmp
> >    radutmp {
> >          filename = "/var/log/radius/radutmp"
> >          username = "%{User-Name}"
> >          case_sensitive = yes
> >          check_with_nas = yes
> >          perm = 384
> >          callerid = yes
> >    }
> >   Module: Checking post-proxy {...} for more modules to load
> >   Module: Checking post-auth {...} for more modules to load
> >   Module: Linked to module rlm_attr_filter
> >   Module: Instantiating attr_filter.access_reject
> >    attr_filter attr_filter.access_reject {
> >          attrsfile = "/etc/raddb/attrs.access_reject"
> >          key = "%{User-Name}"
> >    }
> >   } # modules
> > } # server
> > server {
> >   modules {
> >   Module: Checking authenticate {...} for more modules to load
> >   Module: Checking authorize {...} for more modules to load
> >   Module: Linked to module rlm_preprocess
> >   Module: Instantiating preprocess
> >    preprocess {
> >          huntgroups = "/etc/raddb/huntgroups"
> >          hints = "/etc/raddb/hints"
> >          with_ascend_hack = no
> >          ascend_channels_per_line = 23
> >          with_ntdomain_hack = no
> >          with_specialix_jetstream_hack = no
> >          with_cisco_vsa_hack = no
> >          with_alvarion_vsa_hack = no
> >    }
> >   Module: Checking preacct {...} for more modules to load
> >   Module: Linked to module rlm_acct_unique
> >   Module: Instantiating acct_unique
> >    acct_unique {
> >          key = "User-Name, Acct-Session-Id, NAS-IP-Address,
> Client-IP-Address, NAS-Port"
> >    }
> >   Module: Checking accounting {...} for more modules to load
> >   Module: Linked to module rlm_detail
> >   Module: Instantiating detail
> >    detail {
> >          detailfile =
> "/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
> >          header = "%t"
> >          detailperm = 384
> >          dirperm = 493
> >          locking = no
> >          log_packet_header = no
> >    }
> >   Module: Instantiating attr_filter.accounting_response
> >    attr_filter attr_filter.accounting_response {
> >          attrsfile = "/etc/raddb/attrs.accounting_response"
> >          key = "%{User-Name}"
> >    }
> >   Module: Checking session {...} for more modules to load
> >   Module: Checking post-proxy {...} for more modules to load
> >   Module: Checking post-auth {...} for more modules to load
> >   } # modules
> > } # server
> > radiusd: #### Opening IP addresses and Ports ####
> > listen {
> >          type = "auth"
> >          ipaddr = *
> >          port = 0
> > }
> > listen {
> >          type = "acct"
> >          ipaddr = *
> >          port = 0
> > }
> > listen {
> >          type = "control"
> >   listen {
> >          socket = "/var/run/radiusd/radiusd.sock"
> >   }
> > }
> > Listening on authentication address * port 1812
> > Listening on accounting address * port 1813
> > Listening on command file /var/run/radiusd/radiusd.sock
> > Listening on proxy address * port 1814
> > Ready to process requests.
> > rad_recv: Access-Request packet from host 10.65.100.50 port 32791,
> id=114, length=144
> >          User-Name = "testuser"
> >          NAS-IP-Address = 10.65.100.50
> >          NAS-Identifier = "other"
> >          NAS-Port = 1
> >          NAS-Port-Type = Wireless-802.11
> >          Calling-Station-Id = "0022FB1D434E"
> >          Called-Station-Id = "001B2F249FE0"
> >          Service-Type = Login-User
> >          Framed-MTU = 1100
> >          EAP-Message = 0x02010008016b6d61
> >          Aruba-Essid-Name = "wifix"
> >          Aruba-Location-Id = "1.1.1"
> >          Message-Authenticator = 0x3cbbc184709e658cef90b39bdd2f713d
> > +- entering group authorize {...}
> > ++[preprocess] returns ok
> > ++[chap] returns noop
> > ++[mschap] returns noop
> > [suffix] No '@' in User-Name = "testuser", looking up realm NULL
> > [suffix] No such realm "NULL"
> > ++[suffix] returns noop
> > [eap] EAP packet type response id 1 length 8
> > [eap] No EAP Start, assuming it's an on-going EAP conversation
> > ++[eap] returns updated
> > ++[unix] returns notfound
> > [files] users: Matched entry testuser at line 93
> > [files]         expand: Hello, %{User-Name} ->  Hello, testuser
> 
> "files" is running after "eap" here, so when you set:
> 
> DEFAULT	EAP-TLS-Require-Client-Cert = yes
> 
> ...it's after the EAP module has already run, so is little use.
> 
> Either move the "files" module before "eap", or use unlang to set it:
> 
> authorize {
>    ...
>    update control {
>      EAP-TLS-Require-Client-Cert = yes
>    }
>    eap
>    ...
> }
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html

-- 
GRATIS: Spider-Man 1-3 sowie 300 weitere Videos!
Jetzt freischalten! http://portal.gmx.net/de/go/maxdome



More information about the Freeradius-Users mailing list