The Extensible Authentication Protocol (EAP) is an IKEv2 authentication framework that supports a wide variety of credential types — passwords, certificates, SIM cards, and more. In strongSwan, EAP is used exclusively for IKEv2; for IKEv1 use XAuth instead. In a typical road-warrior deployment, the gateway authenticates itself with a certificate and the client authenticates via EAP, providing a username/password experience familiar to end users.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
Supported EAP Methods
| Method | Plugin | Description |
|---|---|---|
| EAP-MD5 | eap-md5 | Challenge-response using MD5 hash; server-only auth |
| EAP-MSCHAPv2 | eap-mschapv2 | Microsoft CHAP v2; mutual auth, generates MSK |
| EAP-TLS | eap-tls | Certificate-based EAP; mutual authentication |
| EAP-TTLS | eap-ttls | TLS tunnel carrying an inner EAP or PAP/CHAP method |
| EAP-PEAP | eap-peap | Protected EAP; TLS tunnel with inner EAP-MSCHAPv2 |
| EAP-RADIUS | eap-radius | Proxy EAP to an external RADIUS server |
| EAP-SIM | eap-sim | SIM card-based authentication (GSM) |
| EAP-AKA | eap-aka | 3G/4G USIM card-based authentication |
| EAP-GTC | eap-gtc | Generic Token Card (one-time passwords) |
EAP-MD5 does not produce a Master Session Key (MSK) and is not mutual — it only authenticates the client to the server. Use EAP-MSCHAPv2, EAP-TTLS, or EAP-PEAP for stronger password-based authentication.
Gateway Configuration
The gateway authenticates itself with a certificate and requires the client to use EAP:Client Configuration
The client authenticates itself with EAP and verifies the gateway’s certificate:EAP Identity vs IKEv2 Identity
EAP uses two distinct identities:| Identity | Config Key | Purpose |
|---|---|---|
| IKEv2 identity | local { id } | Used in IKE_AUTH; can differ from EAP identity |
| EAP identity | local { eap_id } | Sent in the EAP-Identity response; used for credential lookup |
| AAA server identity | local { aaa_id } | Expected server identity in EAP-TLS/TTLS/PEAP inner exchange |
remote { eap_id = %any }), the client sends its eap_id value. This EAP identity is then used to look up EAP credentials and enforce the uniqueness policy.
EAP-MD5 Example
EAP-MD5 is a simple challenge-response method. The server sends a 16-byte random challenge; the client replies withMD5(identifier | secret | challenge).
EAP-MSCHAPv2 Example
EAP-MSCHAPv2 provides mutual authentication and generates an MSK for IKEv2 key derivation. It supports NTLM-hashed secrets stored separately from plain-text secrets:Combining Certificate + EAP (Two-Round Auth)
RFC 4739 Multiple Authentication allows the client to authenticate with both a certificate and EAP in a single IKE session:EAP-RADIUS
Theeap-radius plugin proxies EAP conversations to an external RADIUS server, enabling integration with existing AAA infrastructure (Active Directory, FreeRADIUS, etc.) without storing credentials locally.
How It Works
strongSwan acts as a RADIUS NAS (Network Access Server). EAP packets received from the IKE client are wrapped in RADIUS Access-Request messages and forwarded to the RADIUS server. The server’s Access-Accept or Access-Reject is translated back into IKE EAP success/failure.swanctl.conf
The connection config remains the same — just use the desired EAP method inremote { auth } as the RADIUS server handles the actual credential check:
strongswan.conf
Configure the RADIUS server instrongswan.conf:
- Single Server
- Multiple Servers
The
eap-radius plugin also registers an XAuth backend named radius, allowing RADIUS-based authentication for IKEv1 XAuth connections.