Skip to main content
dwickramasinghe1
Staff
Staff
Jun 11, 2025 4:31 AM UTC

Troubleshooting Tip: EAP-TTLS connection failing with FortiClient and IPsec IKEv2 connection due to certificate error

Description This article describes how to troubleshoot EAP-TTLS authentication with IKEv2 failing due to a possible certificate error.
Scope FortiClient, FortiGate, IPsec, EAP.
Solution

Starting from FortiClient v7.4.3, EAP-TTLS is now supported with IKEv2 authentication: EAP-TTLS support for IPsec VPN 7.4.3..

In earlier versions of FortiClient, EAP-MSCHAPv2 was the method used for username + password authentication and did not work with LDAP. EAP-TTLS now works with LDAP authentication.

 

This article assumes that the initial configuration for IPsec IKEv2 has been completed, but the tunnel is not coming up due to an 'EAP-TTLS' failure error in the eap_proxy and fnbamd debugs on the FortiGate:

EAP entering state RECEIVED
EAP: parseEapResp: rxResp=1 respId=0 respMethod=21 respVendor=0 respVendorMethod=0
EAP: EAP entering state INTEGRITY_CHECK
EAP: EAP entering state METHOD_RESPONSE
SSL: Received packet(len=13) - Flags 0x00
SSL: Received packet: Flags 0x0 Message Length 0
SSL: (where=0x4004 ret=0x230)
SSL: SSL3 alert: read (remote end reported an error):fatal:unknown CA
SSL: (where=0x2002 ret=0xffffffff)
SSL: SSL_accept:error in error
OpenSSL: openssl_handshake - SSL_connect error:0A000418:SSL routines::tlsv1 alert unknown ca
SSL: 0 bytes pending from ssl_out
SSL: Failed - tls_out available to report error
EAP-TTLS: PHASE1 -> FAILURE
EAP: EAP entering state SELECT_ACTION
EAP: getDecision: method failed -> FAILURE
EAP: EAP entering state FAILURE
EAP: Building EAP-Failure (id=0)

 

If the certificate used by the FortiOS EAP server has expired, the following debug messages can be seen instead:

 

EAP: EAP entering state RECEIVED
EAP: parseEapResp: rxResp=1 respId=241 respMethod=21 respVendor=0 respVendorMethod=0
EAP: EAP entering state INTEGRITY_CHECK
EAP: EAP entering state METHOD_RESPONSE
SSL: Received packet(len=13) - Flags 0x00
SSL: Received packet: Flags 0x0 Message Length 0
SSL: (where=0x4004 ret=0x22d)
SSL: SSL3 alert: read (remote end reported an error):fatal:certificate expired
SSL: (where=0x2002 ret=0xffffffff)
SSL: SSL_accept:error in error
OpenSSL: openssl_handshake - SSL_connect error:0A000415:SSL routines::ssl/tls alert certificate expired
SSL: 0 bytes pending from ssl_out
SSL: Failed - tls_out available to report error
EAP-TTLS: PHASE1 -> FAILURE

 

When either error is seen, it is required to check if the FortiGate Server certificate for the EAP-TTLS connection is trusted by the FortiClient endpoint.

 

config system global

set wifi-certificate Fortinet_Wifi <-- default setting

end

 

  • The default 'Fortinet_Wifi' certificate is trusted by most endpoints, but if a different certificate was selected or the endpoints are not configured to trust certificates signed by public CA's, the certificate may need to be updated.
  • If FortiOS authenticates VPN users against a remote RADIUS server, the remote RADIUS server acts as the EAP server rather than the FortiGate, and the correct EAP methods and certificates must be configured on the remote server. See Technical Tip: FortiOS IKEv2 EAP user authentication operation.

 

The steps below provide an overview of how this issue can be identified and resolved:

  1. Run IKE debugs on the FortiGate and filter for the public IP of the endpoint:


diagnose vpn ike log filter rem-addr4 x.x.x.x
diagnose debug app ike -1
diagnose debug application fnbamd -1
diagnose debug application eap_proxy -1

diagnose debug enable

diagnose debug disable  <----- To disable debugs.

 

To validate this using Wireshark, follow the steps below.

 

  1. Start a packet capture on the FortiGate and filter for the public IP of the endpoint under: 

 

Network -> Diagnostics -> Packet Capture, select 'New Packet Capture', and add the public IP to the 'Host' filter.

PCAP.png

 

  1. Attempt a VPN connection from the endpoint, and check the IKE debugs for the 'EAP Failed for user' error.
  2. Stop the packet capture and take note of the following values from IKE debugs:
  • Initiator.
  • Responder.
  • SK_ei.
  • SK_ai.
  • SK_ar. 

DecryptionValues.png

 

  1. After taking note of the values above, refer to the document below to decrypt the ISAKMP packets through Wireshark: Technical Tip: How to decrypt IPSec Phase-2 (ISAKMP) packets IKEv2

If the correct values were assigned in Wireshark, the PCAP should change and show EAP packets. Refer to the before and after images below.

Before:


beforedecrypt.png
After:


afterdecrypt.png

 

  1. Check the Wireshark capture to see if there is a TLS error with the message 'Unknown CA'.


TLSError.png

 

The TLS alert above generates the following FortiOS debug messages:

 

EAP entering state RECEIVED
EAP: parseEapResp: rxResp=1 respId=0 respMethod=21 respVendor=0 respVendorMethod=0
EAP: EAP entering state INTEGRITY_CHECK
EAP: EAP entering state METHOD_RESPONSE
SSL: Received packet(len=13) - Flags 0x00
SSL: Received packet: Flags 0x0 Message Length 0
SSL: (where=0x4004 ret=0x230)
SSL: SSL3 alert: read (remote end reported an error):fatal:unknown CA

 

  1. Verify the FortiGate WIFI certificate and ensure that it is selected as a trusted certificate instead:


show full system global | grep wifi-certificate

 
VerifyCert.png

Note: 
The 'Fortinet_Wifi' certificate will be generally be trusted by most endpoints since it is signed by a valid public CA:

config system global
    set wifi-certificate Fortinet_Wifi
end

  1. After changing the Wi-Fi certificate option to use a trusted certificate, attempt the VPN connection again and confirm that the certificate error goes away. Repeat steps 2-6 for this part:


GoodHandshake.png

 

Note: User authentication with IKEv2 dial-up tunnels requires some CLI-only configuration including enabling EAP as shown below. See Technical Tip: A guide to dial-up IPSec VPN authentication and policy matching for more information.

 

imagen.jpg

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT