This episode covers L2TP/IPsec support on mobile devices: the native capabilities of iOS, Android, Windows, and macOS, per-platform configuration templates, centralized profile management via Configuration Profile and MDM, and common troubleshooting.

One of the reasons L2TP/IPsec has survived for more than two decades is its native support on all operating systems. iPhone, Android, Windows, and macOS users all have a built-in L2TP/IPsec client — no app installation needed. Episode 18 discusses how to use it correctly and manage it centrally.
This advantage is also a challenge: every platform has its own terminology and pitfalls. We will dissect the per-platform configuration, create centralized profiles, and close with troubleshooting connections from devices.
iOS and macOS use the L2TP/IPsec client with PSK and username-password. The settings are located in Settings and System Settings. The values you fill in must be consistent with your server: server address, account, password, secret (PSK), and authentication type.
Android provides L2TP/IPsec PSK and L2TP/IPsec MSCHAPv2 as built-in VPN types. Windows also has an L2TP/IPsec client; on Windows 10 and 11, add it via Settings then VPN, choosing the L2TP/IPsec type with PSK. Both platforms sometimes need MTU tuning or special registry settings — covered in the troubleshooting section.
A summary of the terms you must align across platforms:
Server address : 203.0.113.10 atau vpn.example.com
Secret / PSK : sama dengan nilai di ipsec.secrets
Account : username di chap-secrets
Password : password di chap-secretsFor iOS and macOS, create a Configuration Profile XML containing the VPN payload. Install it via Safari, email, or MDM. A minimal payload example:
<dict>
<key>PayloadType</key>
<string>com.apple.vpn.managed</string>
<key>VPNType</key>
<string>L2TP</string>
<key>AuthenticationMethod</key>
<string>SharedSecret</string>
<key>SharedSecret</key>
<string>rahasia-psk</string>
<key>RemoteAddress</key>
<string>vpn.example.com</string>
</dict>The VPNType part is of type L2TP and SharedSecret contains the PSK. Wrap the whole thing in a plist envelope before signing it.
Windows accepts VPN profiles in XML format. Save them as a .pbk file or distribute them via group policy:
<VPNProfile>
<ProfileName>Kantor</ProfileName>
<ConnectionType>L2TP</ConnectionType>
<NativeProtocolType>L2TP</NativeProtocolType>
<Authentication>UserNameAndPassword</Authentication>
<L2tpPsk>rahasia-psk</L2tpPsk>
</VPNProfile>Distribute this file together with an MDM such as Intune, or via Add-VpnConnection in PowerShell.
MDM (Mobile Device Management) — such as Jamf, Intune, or Workspace ONE — distributes profiles centrally, forces VPN connections on certain networks, and pulls access when a device is lost. For deployments with hundreds of devices, MDM is a requirement to keep policies consistent.
A few typical mobile client failures:
ikev2=never or ikev1=always.ipsec.secrets.chap-secrets and the password is correct.Check from the server side while a client tries to connect:
sudo journalctl -u strongswan -f
sudo tail -f /var/log/syslog | grep pppdThe pppd logs will show whether authentication succeeded and which IP address was given. If the connection drops after a few seconds, it is almost certainly an MTU problem — set mtu 1350 in options.xl2tpd.
Tip
For testing, enable ppp debug and ipsec verbose briefly. The detailed logs from both daemons will show which layer failed — IKE, L2TP, or PPP — without guessing.
Episode 18 equipped you with the client side: native L2TP/IPsec support on iOS, Android, Windows, and macOS, XML profile templates, centralized distribution via MDM, and common troubleshooting patterns.
Key takeaways:
Add-VpnConnection.In the next episode, episode 19, we will discuss high availability and redundancy — HA patterns with multiple LNSes, failover via DPD, and load balancing with DNS round-robin and ECMP.