This episode dissects strongSwan as a modern alternative: the legacy ipsec.conf configuration style, the new swanctl approach, and the IKEv2, EAP, MOBIKE, and certificate chain features. You also write your first L2TP/IPsec configuration using swanctl.

If Libreswan is the trusted veteran, strongSwan is the IPsec implementation most diligent about following modern standards. Episode 10 dissects it: two configuration styles — the legacy ipsec.conf and the modern swanctl — plus flagship features such as full IKEv2, EAP, MOBIKE, and complete certificate chain handling.
strongSwan is highly relevant for L2TP/IPsec because charon handles IPsec with high precision, while xl2tpd remains the L2TP daemon on top of it. After this episode, you can choose the IPsec daemon that best fits your deployment.
Historically, strongSwan used ipsec.conf in a style similar to Libreswan, with global parameters in strongswan.conf:
conn L2TP-IKEv1
type=transport
left=%any
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
authby=secret
ikev1=always
esp=aes128-sha1
auto=addNote the ikev1=always — this is the equivalent of Libreswan's ikev2=never and forces IKEv1 negotiation, which classic L2TP clients need.
Since version 5, strongSwan recommends swanctl with the more explicit swanctl.conf file. Its structure is based on named sections, similar to YAML:
connections {
L2TP-IKEv1 {
version = 1
proposals = aes256-sha256-modp2048
local-1 {
auth = psk
}
remote-1 {
auth = psk
}
children {
L2TP {
type = transport
local_ts = udp/1701
remote_ts = dynamic[udp]
esp_proposals = aes128-sha1
}
}
}
}In the children block, local_ts = udp/1701 restricts the protected traffic to UDP 1701 only — exactly the role of leftprotoport in the legacy style.
Charon fully implements IKEv2 (RFC 7296) and supports EAP for user authentication. With EAP, credentials do not need to be wrapped by old mechanisms like XAUTH — EAP can wrap EAP-MSCHAPv2, EAP-TLS, or EAP-TTLS for clean RADIUS integration.
MOBIKE keeps a connection alive when a device changes networks, and complete certificate chain handling ensures full validation from leaf to root CA. Logging and control are done through swanctl as in episode 8:
sudo swanctl --load-all
sudo swanctl --initiate --child L2TP
sudo swanctl --list-sasThe swanctl --list-sas command displays SAs after initiation and must show state ESTABLISHED.
Apply the configuration and check the result:
sudo systemctl restart strongswan
sudo swanctl --load-all
sudo swanctl --list-connsThe charon logs show every step of the IKE negotiation:
sudo journalctl -u strongswan -fIf the log ends with IKE_SA ... established, the IPsec layer succeeded. A common problem: proposal mismatch — match the proposals and esp_proposals blocks with the suites your clients support.
Info
strongSwan and Libreswan must not run together on the same machine because both manage the same kernel IPsec stack. If you want to compare them, install each in a separate VM as we prepared in episode 0.
Episode 10 completed the IPsec implementation picture: strongSwan with its two configuration styles, the IKEv2, EAP, MOBIKE, and certificate chain features, and how to apply and verify an L2TP configuration using swanctl.
Key takeaways:
ipsec.conf style or the modern swanctl.conf.ikev1=always forces IKEv1 for classic L2TP clients.swanctl is the modern control interface replacing ipsec auto.In the next episode, episode 11, we will discuss xl2tpd and PPP setup — the [lns default] configuration, integration with options.xl2tpd, enforcing MS-CHAPv2, and IP address assignment for clients.