[strongSwan] EAP TTLS MSCHAPv2 authentication error : expected AVP_EAP_MESSAGE but received 462
Marwane L
marwane.lechguer at gmail.com
Tue Apr 19 14:45:23 CEST 2016
Hi,
I'm currently trying to authenticate a strongswan client using Cisco ePDG
as an ikev2 tunnel termination and Alcatel Lucent Motive, as AAA server.
Authentication is based on diameter protocol.
Strongswan client <---------> Cisco ePDG <------------> AAA
Every thing goes well during a simple EAP-MSCHAPv2 authentication and i'm
getting "EAP-MS-CHAPv2 succeeded: '(null)' ".
At the end, the connection fails because the ePDG is not yet connected to
Packet Data Network Gateway, but the authentication suceed as shown bellow :
###################################################################
initiating IKE_SA eap_mschapv2[13] to X.X.X.X
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP)
N(HASH_ALG) ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (320 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (288 bytes)
parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
establishing CHILD_SA eap_mschapv2
generating IKE_AUTH request 1 [ IDi N(INIT_CONTACT) IDr CPRQ(ADDR DNS DNS)
SA TSi TSr N(EAP_ONLY) ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (268 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (108 bytes)
parsed IKE_AUTH response 1 [ IDr EAP/REQ/ID ]
server requested EAP_IDENTITY (id 0x02), sending '
xxxxxxxxxxxxxxxx at nai.epc.mncxxx.mccxxx.3gppnetwork.org'
allow mutual EAP-only authentication
generating IKE_AUTH request 2 [ EAP/RES/ID ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (124 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (140 bytes)
parsed IKE_AUTH response 2 [ EAP/REQ/MSCHAPV2 ]
server requested EAP_MSCHAPV2 authentication (id 0x03)
generating IKE_AUTH request 3 [ EAP/RES/MSCHAPV2 ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (188 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (124 bytes)
parsed IKE_AUTH response 3 [ EAP/REQ/MSCHAPV2 ]
EAP-MS-CHAPv2 succeeded: '(null)'
generating IKE_AUTH request 4 [ EAP/RES/MSCHAPV2 ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (76 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (76 bytes)
parsed IKE_AUTH response 4 [ ]
generating INFORMATIONAL request 5 [ N(AUTH_FAILED) ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (76 bytes)
establishing connection 'eap_mschapv2' failed
###################################################################
When i try a connection based on EAP-TTLS and MSCHAPv2 in phase 2, i got
the following error : expected AVP_EAP_MESSAGE but received 462
###################################################################
initiating IKE_SA eap_ttls_mschapv2[12] to X.X.X.X
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP)
N(HASH_ALG) ]
sending packet: from Y.Y.Y.Y[500] to X.X.X.X[500] (320 bytes)
received packet: from X.X.X.X[500] to Y.Y.Y.Y[500] (288 bytes)
parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
establishing CHILD_SA eap_ttls_mschapv2
generating IKE_AUTH request 1 [ IDi CPRQ(ADDR DNS DNS) SA TSi TSr
N(MOBIKE_SUP) N(ADD_4_ADDR) N(EAP_ONLY) ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (268 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (108 bytes)
parsed IKE_AUTH response 1 [ IDr EAP/REQ/ID ]
server requested EAP_IDENTITY (id 0x02), sending '
xxxxxxxxxxxxxxxx at nai.epc.mncxxx.mccxxx.3gppnetwork.org'
allow mutual EAP-only authentication
generating IKE_AUTH request 2 [ EAP/RES/ID ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (124 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (76 bytes)
parsed IKE_AUTH response 2 [ EAP/REQ/TTLS ]
server requested EAP_TTLS authentication (id 0x03)
EAP_TTLS version is v0
generating IKE_AUTH request 3 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (252 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (1100 bytes)
parsed IKE_AUTH response 3 [ EAP/REQ/TTLS ]
generating IKE_AUTH request 4 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (76 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (1100 bytes)
parsed IKE_AUTH response 4 [ EAP/REQ/TTLS ]
generating IKE_AUTH request 5 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (76 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (972 bytes)
parsed IKE_AUTH response 5 [ EAP/REQ/TTLS ]
negotiated TLS 1.1 using suite TLS_RSA_WITH_AES_128_CBC_SHA
received TLS server certificate 'C=FR, O=company France, OU=www.company.com,
CN=company France - server, L=Arceuil Cedex / Lyon, ST=company'
received TLS intermediate certificate 'C=FR, O=company France, OU=
www.company.com, CN=company France - root, L=Arceuil Cedex / Lyon,
ST=company'
using certificate "C=FR, O=company France, OU=www.company.com, CN=company
France - server, L=Arceuil Cedex / Lyon, ST=company"
using trusted ca certificate "C=FR, O=company France, OU=www.company.com,
CN=company France - root, L=Arceuil Cedex / Lyon, ST=company"
checking certificate status of "C=FR, O=company France, OU=www.company.com,
CN=company France - server, L=Arceuil Cedex / Lyon, ST=company"
certificate status is not available
reached self-signed root ca with a path length of 0
generating IKE_AUTH request 6 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (428 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (156 bytes)
parsed IKE_AUTH response 6 [ EAP/REQ/TTLS ]
sending tunneled EAP-TTLS AVP [EAP/RES/ID]
generating IKE_AUTH request 7 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (204 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (220 bytes)
parsed IKE_AUTH response 7 [ EAP/REQ/TTLS ]
expected AVP_EAP_MESSAGE but received 462
sending TLS close notify
generating IKE_AUTH request 8 [ EAP/RES/TTLS ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[4500] (140 bytes)
received packet: from X.X.X.X[4500] to Y.Y.Y.Y[4500] (92 bytes)
parsed IKE_AUTH response 8 [ EAP/FAIL N(AUTH_FAILED) ]
received AUTHENTICATION_FAILED notify error
establishing connection 'eap_ttls_mschapv2' failed
###################################################################
The value "462" corresponds to "EAP-Payload" diameter AVP.
I noted that the eap_ttls pulgin source code contain "AVP_EAP_MESSAGE"
variable mapped to "79" int value, which corresponds to "EAP-Message"
RADIUS attribute :
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c:20:#define
AVP_EAP_MESSAGE 79
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c:68:
writer->write_uint32(writer, AVP_EAP_MESSAGE);
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c:126: if
(avp_code != AVP_EAP_MESSAGE)
src/libcharon/plugins/eap_ttls/eap_ttls_avp.c:128:
DBG1(DBG_IKE, "expected AVP_EAP_MESSAGE but received %u", avp_code);
Does it mean that strongswan's EAP TTLS plugin is only compatible with
radius attributes ?
Any ideas to solve the problem ?
Thanks for you're help,
Marwane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/users/attachments/20160419/e350d8bd/attachment.html>
More information about the Users
mailing list