Layer 2 Tunneling Protocol (L2TP) combined with IPsec encryption remains one of the most widely supported VPN protocols across platforms — natively available on Windows, macOS, iOS, Android, and Linux without installing third-party clients. While WireGuard and OpenVPN dominate modern VPN deployments, L2TP/IPsec fills a specific niche: maximum client compatibility with reasonable security. In this guide, we compare three self-hosted L2TP server implementations: xl2tpd, accel-ppp, and the Linux kernel L2TPv3 module.
Why L2TP/IPsec Still Matters
Despite being superseded by modern protocols, L2TP/IPsec is still the default VPN choice for many enterprise environments because every major OS includes a built-in L2TP client. No software installation is needed on the client side — users simply configure a VPN connection in their OS network settings. This makes L2TP/IPsec ideal for:
- Corporate remote access where IT cannot mandate client software installation
- Mobile device management with minimal configuration overhead
- Legacy systems that only support L2TP/IPsec
- Temporary or guest VPN access without client distribution
The security model relies on IPsec (typically IKEv2 with ESP) for encryption and authentication, while L2TP provides the tunnel encapsulation. The combination is considered secure when configured with strong ciphers (AES-256, SHA-256, 2048-bit+ DH groups).
xl2tpd — The Standard L2TP Daemon
xl2tpd (xelerance/xl2tpd) is the most widely deployed open-source L2TP server, a fork of the original l2tpd project by Xelerance, with 563+ GitHub stars. It handles the L2TP tunnel and session management, while IPsec is provided by a separate daemon (Libreswan, StrongSwan, or Openswan).
Key Features
- L2TPv2 protocol support
- Multiple simultaneous tunnels and sessions
- PAP/CHAP authentication
- Integration with pppd for PPP session management
- RADIUS accounting support
- IPv4 and IPv6 passthrough
- Compatible with all major IPsec implementations
- Well-documented and battle-tested
Installation with Libreswan
| |
Docker Deployment
| |
accel-ppp — High-Performance Multi-Protocol PPP Server
accel-ppp (accel-ppp/accel-ppp) is a high-performance PPP server supporting PPTP, L2TP, PPPoE, and IPoE protocols, with 320+ GitHub stars. Unlike xl2tpd which relies on pppd, accel-ppp handles PPP natively in a multi-threaded architecture, delivering significantly higher throughput and connection density.
Key Features
- L2TP, PPTP, PPPoE, and IPoE in a single daemon
- Multi-threaded architecture for high concurrency
- Built-in RADIUS client for authentication
- Traffic shaping and bandwidth limiting
- IP address pool management
- VLAN tagging support
- SNMP statistics export
- Built-in web monitoring interface
Configuration
| |
Docker Deployment
| |
Linux Kernel L2TPv3 — Built-in Tunneling
The Linux kernel includes native L2TPv3 support through the l2tp_eth and l2tp_netlink modules. Unlike xl2tpd (which implements L2TPv2 in userspace), the kernel L2TPv3 module provides L2TP tunneling at the kernel level with minimal overhead. It is configured using the ip l2tp command from iproute2.
Key Features
- Kernel-space performance (no context switching)
- L2TPv3 protocol (successor to L2TPv2)
- Ethernet and IP encapsulation modes
- Configurable via iproute2 (
ip l2tpcommands) - No additional daemon required for tunnel management
- Compatible with any userspace L2TPv3 peer
- Integrated with Linux networking stack
Configuration
| |
Key Difference from xl2tpd
The kernel L2TPv3 module does not implement the L2TP Control Connection Protocol (L2TPv2 signaling). It provides raw L2TPv3 tunnels that must be set up statically or managed by a custom control daemon. For dynamic L2TPv2 connections (what most VPN clients expect), you still need xl2tpd or accel-ppp.
Comparison Table
| Feature | xl2tpd | accel-ppp | Linux L2TPv3 |
|---|---|---|---|
| GitHub Stars | 563+ | 320+ | Kernel (no repo) |
| Protocol | L2TPv2 | L2TPv2 + others | L2TPv3 only |
| Performance | Moderate (pppd) | High (multi-thread) | Highest (kernel) |
| Max Connections | ~500-1000 | 10,000+ | Unlimited |
| IPsec Required | Yes (external) | Yes (external) | Yes (external) |
| RADIUS Auth | Via pppd | Built-in | N/A |
| Traffic Shaping | Via pppd | Built-in | Via tc |
| Multi-Protocol | L2TP only | L2TP/PPTP/PPPoE/IPoE | L2TPv3 only |
| Dynamic Signaling | Yes | Yes | No (static only) |
| Best For | Standard VPN | High-scale ISP | Point-to-point tunnels |
Why Self-Host Your L2TP VPN Server?
Self-hosted L2TP/IPsec gives you complete control over remote access infrastructure without per-user licensing fees. Commercial VPN appliances and cloud VPN services charge per concurrent connection — with xl2tpd or accel-ppp, you can serve hundreds of users on a single $5/month VPS.
For organizations that need maximum client compatibility, L2TP/IPsec remains the most universally supported VPN protocol. Every major operating system includes a native L2TP client, meaning zero client deployment overhead. This is particularly valuable for BYOD environments, guest access, and temporary contractors.
Running L2TP behind a properly configured nftables firewall adds network-level access control, while pairing with a strong IPsec implementation like Libreswan ensures encrypted transport. For additional access management, consider integrating with a self-hosted auth platform for centralized identity management across all remote access services.
Choosing the Right L2TP Server
- xl2tpd is the standard choice for traditional L2TP/IPsec VPN deployments. Its compatibility with pppd, Libreswan, and RADIUS makes it the most documented and widely used option.
- accel-ppp is ideal for ISP-scale deployments or when you need multi-protocol support (L2TP + PPPoE + PPTP) with high performance and built-in RADIUS.
- Linux kernel L2TPv3 is best for static point-to-point tunnels between known endpoints where maximum performance and minimal overhead are required. Not suitable for dynamic remote access VPNs.
FAQ
Is L2TP/IPsec still secure in 2026?
When configured with strong ciphers (AES-256-GCM, SHA-256, 2048-bit+ DH groups), L2TP/IPsec provides adequate security for most use cases. However, the NSA has historically been suspected of weakening L2TP implementations. For maximum security, prefer WireGuard or OpenVPN. L2TP/IPsec is best used when client compatibility is the primary requirement.
Why does L2TP need IPsec?
L2TP provides tunneling but no encryption. IPsec provides the encryption, authentication, and integrity protection for the tunneled traffic. The two protocols are always used together — L2TP without IPsec sends data in plaintext.
Can xl2tpd handle IPv6 traffic?
xl2tpd can carry IPv6 traffic within the PPP session, but the L2TP control connection itself is IPv4-only. For full IPv6 L2TP support, consider accel-ppp or the kernel L2TPv3 module.
What port does L2TP/IPsec use?
L2TP uses UDP port 1701 for tunnel control. IPsec uses UDP port 500 (IKE key exchange) and UDP port 4500 (NAT traversal). These ports must be open on your firewall.
How many concurrent users can xl2tpd support?
xl2tpd with pppd typically handles 500-1,000 concurrent connections on a modern server. The bottleneck is usually pppd (one process per connection). accel-ppp, being multi-threaded, can handle 10,000+ connections on the same hardware.
Can I use certificates instead of PSK for L2TP/IPsec?
Yes, Libreswan and StrongSwan both support certificate-based IPsec authentication. Replace the PSK in /etc/ipsec.secrets with certificate references. This provides stronger authentication, especially for large deployments.