Remote-Access VPN / L2TP-IPsec Series

🛡️ Comparing L2TP/IPsec to Modern VPN Protocols from a "Top 1%" Perspective — How It Differs from IKEv2/IPsec, OpenVPN, and WireGuard

Introduction

This article is part of the Top 1% Series’ full article guide.

Prerequisites

Getting the Big Picture

In a Nutshell

The single biggest reason L2TP/IPsec is called “legacy” comes down to a difference in design philosophy: it’s a “patchwork” combination, bolted together after the fact, of two protocols originally designed for entirely different purposes—a tunneling technology with no encryption (L2TP) and an encryption technology with no user-authentication capability (IPsec, as based on IKEv1)—whereas the protocols in mainstream use today were built from the ground up with a consistent design aimed at a single goal: secure remote-access VPN.

graph TB
    subgraph Legacy["L2TP/IPsec (a patchwork combination)"]
        L1["L2TP (tunnel + authentication)"] -.combined after the fact.-> L2["IPsec (encryption)"]
    end
    subgraph Modern["Modern VPN protocols (consistently designed)"]
        M1["IKEv2/IPsec<br/>(designed as an integrated whole, within IPsec, from the start)"]
        M2["OpenVPN<br/>(a self-contained, consistent design built on TLS)"]
        M3["WireGuard<br/>(a minimal design built on the Noise framework)"]
    end

Here’s a summary of the main differences among the four protocols:

ProtocolStandardized/IntroducedTransport It Runs OverRough Implementation SizeResilience on Mobile Networks
L2TP/IPsecL2TP: 1999 (RFC 2661); IPsec: 1995 onward (multiple RFCs)UDP (500/1701/4500)Large (requires a separate IKE daemon, L2TP daemon, and PPP daemon)Weak (an IP address change tends to force re-establishment of the IKE SA)
IKEv2/IPsec2005 onward (RFC 7296, used without L2TP)UDP (500/4500)Large (self-contained in a single IKE daemon, but the implementation still inherits much of IKEv1-era complexity)Strong (the MOBIKE extension handles IP address changes)
OpenVPN2001 onwardUDP or TCP (port number is freely configurable)Medium-to-large (a user-space implementation built on OpenSSL)Implementation-dependent (by default, tends to require session re-establishment)
WireGuardMerged into the Linux kernel in 2020UDPSmall (the core is roughly 4,000 lines)Strong (peers are identified by public key, not IP address, so it doesn’t depend on the IP address staying fixed)

Fundamentals, Thoroughly Explained

Why the “Transport It Runs Over” Matters for Remote-Access VPN

The “Transport It Runs Over” column in the comparison table isn’t just a spec-sheet detail. It’s one of the most practically important selection criteria for a remote-access VPN, because it directly determines which networks the VPN can actually connect from, and how stable its performance will be. There are two main reasons.

  1. Ease of traversing firewalls and NAT: Corporate networks, and public Wi-Fi at hotels or airports, often block UDP traffic and the ESP protocol (IP protocol number 50) that IPsec uses, as a matter of security policy, allowing only TCP ports 80 and 443 (used for ordinary web traffic) out to the internet. UDP-only protocols like IKEv2/IPsec and WireGuard can sometimes fail to connect from such restrictive networks, whereas OpenVPN can be configured to run over TCP port 443, making it look, to anything on the path, like ordinary HTTPS traffic — which makes it much easier to establish a connection (covered in more detail in the OpenVPN section below). The reason IPsec-family protocols have a NAT-T (NAT Traversal) mechanism that re-wraps themselves inside UDP port 4500 (which does have a port number) when behind NAT is the same underlying constraint: ESP, being identified purely by protocol number, doesn’t traverse NAT devices well (the internal workings of NAT-T are covered in depth in How L2TP/IPsec Works).
  2. Impact on performance and stability — the “TCP over TCP” problem: When the VPN tunnel itself runs over TCP, the user’s own traffic flowing through the tunnel (SSH, HTTPS, and so on — much of which is itself TCP) ends up nested as “TCP inside TCP.” When packet loss occurs on the path, the inner TCP connection (the user’s traffic) and the outer TCP connection (the tunnel itself) each independently try to run their own retransmission timers and congestion control, and these retransmissions end up competing with each other. RTT estimates get thrown off, and throughput can drop sharply. This is a well-known phenomenon called “TCP-over-TCP meltdown,” and it’s the main reason OpenVPN recommends UDP as its default mode of operation, treating the TCP-443 configuration as a fallback specifically for restrictive-firewall environments.

In short, UDP is designed to leave retransmission, when packet loss occurs, up to the application riding inside the tunnel while the tunnel itself stays lightweight — which usually means high performance and low latency, but it can’t connect where UDP itself is blocked. TCP prioritizes connectivity at the cost of the TCP-over-TCP performance risk described above. That tradeoff between connectivity and performance is the real meaning behind lining up each protocol’s supported transport in the comparison table.

Why Is L2TP/IPsec Called “Legacy”?

The grounds for considering L2TP/IPsec dated boil down to three main points.

  1. The complexity of implementation and operations that comes from combining several independent standards: Getting L2TP/IPsec working requires three separately developed software components to cooperate: an IPsec daemon that handles IKE/ESP (e.g., strongSwan), an L2TP daemon that handles L2TP tunnels and sessions (e.g., xl2tpd), and a PPP daemon that handles PPP negotiation (e.g., pppd) (the daemon execution model itself — a process that stays resident in the background — is covered in What Is a Daemon?). Because a single connection sequence spans multiple processes and protocol stacks, isolating problems during failures is difficult, and interoperability bugs between different implementations have historically been reported quite often.
  2. Weakness when a mobile client switches networks: In the IKEv1-based IPsec that L2TP/IPsec relies on, the SA (Security Association) is tightly bound to the client’s IP address. An SA is the set of parameters two parties have agreed on — which cryptographic algorithm to use, which key, what the current sequence number is, and so on — registered in the SAD (Security Association Database) inside the IPsec implementation once IKE has finished exchanging keys. The reason this SA ends up tightly bound to an IP address is that the matching rule that decides which packets an SA applies to (the SPD’s selectors — Security Policy Database) is built primarily around the source/destination IP addresses of the peer. When the client’s IP address changes — switching from Wi-Fi to a mobile connection, for instance — the SA itself, keys and all, may still technically be valid, but there’s no longer a matching rule that ties traffic from the new IP address to that SA. As a result the existing IKE SA and ESP SA become unusable in practice, and most implementations require renegotiating from Phase 1 all over again. This doesn’t sit well with how mobile devices are used today.
  3. Known weaknesses around key exchange and authentication: Individually, mitigations exist for issues like the risk of offline brute-force attacks against a pre-shared key (PSK) in IKEv1’s Aggressive Mode, or the cryptographic weaknesses in MS-CHAPv2 used for PPP authentication (switching to Main Mode, moving to certificate-based authentication, and so on). But the fact that the design leaves so much room to end up choosing a weak configuration in the first place is a recurring finding in security audits.

None of this means “secure communication is categorically impossible with L2TP/IPsec”—with the right configuration (certificate-based authentication, Main Mode, operating in a way that doesn’t depend on MOBIKE-style mobility, etc.), it can achieve entirely adequate security in practice. But the fact that so many of these configurations demand careful attention from administrators is a relative weakness compared to protocols designed from the ground up to default to the safe choice.

IKEv2/IPsec: The “Evolved” Version That Skips L2TP

IKEv2 (RFC 7296) is the key-exchange protocol standardized as IKEv1’s successor. The decisive difference from L2TP/IPsec is that IKEv2 by itself, without going through L2TP, can provide everything a remote-access VPN needs.

The difference between IKEv1 and IKEv2 isn’t just a version number — the message-exchange design itself was overhauled.

AspectIKEv1IKEv2
Per-user authenticationNot part of the standard; relies on vendor extensions like XAuthBuilt into the standard as EAP
Virtual IP/DNS assignmentNot part of the standard; relies on L2TP’s IPCPBuilt into the standard as the Configuration Payload
Resilience to IP address changesNone (requires renegotiating from Phase 1)Standard support via the MOBIKE extension (RFC 4555)
Number of message round tripsMany: Phase 1 (Main Mode, 6 round trips) + Phase 2 (Quick Mode, 3 round trips)Simplified to 4 round trips (IKE_SA_INIT + IKE_AUTH)
DoS resistanceProne to starting expensive processing before verifying the source isn’t spoofedLets the responder demand a cookie first, making it more resistant to spoofed-source load attacks

The first two rows of that table — per-user authentication and virtual IP/DNS assignment — map directly onto the root cause that made L2TP/IPsec need L2TP in the first place: IPsec by itself had no mechanism for the user authentication or IPCP-style address assignment that PPP used to provide. The accurate way to put it is that IKEv2 didn’t import PPP itself; it rebuilt the two roles PPP used to play — user authentication and address assignment — as native, standard features inside IKEv2’s own message exchange.

This is exactly why so many of the built-in VPN clients on Windows, iOS, macOS, and Android natively support IKEv2/IPsec alongside L2TP/IPsec.

OpenVPN: A General-Purpose VPN Built on TLS

OpenVPN is a piece of VPN software that reuses the same library (OpenSSL) that underpins TLS (SSL), the protocol widely used to secure HTTPS traffic on the web, implementing key exchange, authentication, and encryption as a single, consistent protocol stack. Rather than IPsec’s “combination of several separate standards,” it’s built on a single design based on a TLS handshake, and supports both certificate-based and PSK authentication (why TLS combines key exchange, authentication, and encryption the way it does is covered in How PKI and Digital Certificates Work; the inner workings of the symmetric-key cryptography that encrypts the actual data are covered in How Symmetric-Key Encryption (AES) and HMAC/AEAD Work). (Why “encrypting with TLS” amounts to a VPN connection at all — the Control/Data Channel split, and configuration delivery via the Push mechanism — is covered in depth in How OpenVPN Works.)

TLS was originally built to encrypt a specific application’s communication, the way it secures HTTP traffic between a browser and a server. What OpenVPN does is take the raw IP packets handed to it by the OS through a TUN virtual network interface (covered below) and pour them straight into a single TLS connection. From TLS’s point of view, it has no idea what’s inside the connection — it’s just a byte stream, and it treats an HTTP request and an IP packet exactly the same way. There’s nothing special, spec-wise, about pouring arbitrary data into a TLS-protected connection like this; OpenVPN simply exploits that property to implement its VPN tunnel.

Aside: SSL vs. TLS

SSL (Secure Sockets Layer) was the original protocol for encrypting web traffic, developed by Netscape in the 1990s. The specification was later handed off to the IETF, which standardized TLS (Transport Layer Security) in 1999 as SSL’s effective successor (early TLS 1.0 was internally referred to at Netscape as “SSL 3.1,” underscoring just how continuous the two specs really are). Every version of SSL (2.0, 3.0, and so on) is now deprecated due to known vulnerabilities, and every modern implementation you’ll actually encounter in production is TLS (mainly TLS 1.2/1.3 today). Even so, “SSL” persists as the colloquial term out of habit — “SSL certificate,” “SSL/TLS,” and so on — so whenever you see “SSL” in practice, it’s safe to assume it actually means TLS.

So why didn’t the designers of L2TP and IPsec just build a TLS-based VPN from the start? There are three main reasons.

  1. A generational gap: SSL (TLS’s predecessor) was published by Netscape around 1994–1995, and TLS 1.0 (RFC 2246) wasn’t standardized until 1999. IPsec’s original form, by contrast, had been under standardization since around 1995 — roughly the same era, or slightly ahead of TLS. The option of “building on the newer TLS instead of the already-running IPsec design” simply hadn’t matured yet at the time.
  2. A difference in the scope the design targeted: L2TP/IPsec was aiming to transparently tunnel arbitrary Layer-2 traffic between sites — not just IP packets but Ethernet frames as well (it wasn’t unusual back then for a company’s internal network to run non-IP protocols like IPX or AppleTalk). TLS assumes a single TCP connection as its foundation, and was never designed with that kind of Layer-2 transparency in mind.
  3. The TCP-over-TCP problem discussed above: TLS fundamentally runs on top of TCP. Building a VPN tunnel on top of TLS (i.e., TCP) reintroduces the “TCP-over-TCP meltdown” described in the previous section, causing throughput to collapse on lossy connections. The reason IPsec (ESP) and WireGuard are designed to run over UDP is precisely to avoid this problem, and it’s the same reason OpenVPN is recommended to run over UDP wherever possible. Implementing a VPN over TLS is entirely possible — but as long as it’s built on TCP, this constraint doesn’t go away.
Aside: "VPN server" versus "VPN software"

L2TP/IPsec and IKEv2/IPsec are combinations of protocols, and the server-side software that implements them comes from multiple vendors and projects — strongSwan, Windows RRAS, and others. That’s why a vendor-neutral phrase like “a VPN server (built with strongSwan, say)” reads naturally. OpenVPN, by contrast, has its protocol specification and its implementation fused into essentially one open-source program (openvpn, developed by OpenVPN Inc.), used as both server and client alike. “OpenVPN server” isn’t wrong, but articles sometimes say “OpenVPN software” instead specifically to emphasize this fusion of “protocol name” and “specific piece of software.”

OpenVPN’s biggest practical advantage is that it can run over TCP as well as UDP, and the port number it uses is entirely configurable. If it’s configured to use TCP port 443 (the port ordinarily used for HTTPS), it looks, to any firewall or proxy along the path, like nothing more than “ordinary HTTPS traffic”—making it much easier to establish a connection even on restrictive networks that tend to block UDP or IPsec-related protocols. On the other hand, because the implementation runs in user space (exchanging data with the kernel through a virtual network interface—a TUN/TAP device), every packet incurs a context switch between user space and kernel space, which tends to put OpenVPN at a throughput disadvantage compared to WireGuard, discussed next.

Aside: What is a TUN/TAP device?

A TUN/TAP device is a virtual network interface mechanism provided by the Linux kernel that lets a user-space program like OpenVPN directly read and write IP packets (TUN) or Ethernet frames (TAP) to and from the kernel’s network stack. The OS treats it as a single network interface, indistinguishable from a physical NIC, but it’s actually a purely software-created virtual device that needs no additional physical hardware. Why this mechanism is indispensable to user-space VPN software, and how it creates a performance gap against kernel-space implementations, is covered in more detail in User Space, Kernel Space, and TUN/TAP Devices.

WireGuard: A Modern Design Built Around Radical Minimalism

WireGuard is a comparatively new VPN protocol and implementation, merged into the Linux kernel proper (5.6) in 2020 (the Noise-framework-based handshake and Cryptokey Routing — the mapping between public keys and AllowedIPs — are covered in depth in How WireGuard Works). Its design philosophy stands in stark contrast to IPsec’s and OpenVPN’s: it’s built on the principle that “drastically shrinking the number of choosable cryptographic algorithms, and fixing on a single modern, well-proven cipher suite, eliminates the very possibility of misconfiguration or downgrade attacks.”

The View from the Top 1% (What Experts See)

Why “Complexity” Directly Translates into Security Risk

In the world of VPN protocols, the principle that “complexity in the implementation or specification itself widens the attack surface” carries a lot of weight. The more message types and extension specs an IKE negotiation has to handle, the higher the risk that a bug is hiding somewhere in the implementation—and in practice, both strongSwan and OpenVPN have had a history of multiple serious vulnerabilities reported (some leading to remote code execution or denial of service). WireGuard’s deliberate elimination of choice among cryptographic algorithms, and its drastically minimized codebase, is a design decision that clearly reflects this “complexity equals attack surface” lesson. The fact that it went through review by prominent cryptographers and security researchers on its way into the Linux kernel proper backs up the real-world effectiveness of this design philosophy.

Performance Characteristics: User-Space vs. Kernel-Space Implementations

VPN implementations broadly split into those running outside the OS kernel (user space) and those running inside it (kernel space). OpenVPN is a user-space implementation, so every packet it processes incurs a context switch and memory copy between the kernel and user space. WireGuard, by contrast, is a kernel-space implementation built directly into the Linux kernel, so this back-and-forth overhead is much smaller—which tends to give it an edge in both throughput and latency under equivalent conditions. IPsec (whether L2TP/IPsec or IKEv2/IPsec) can also take advantage of kernel-space crypto processing on many OSes (frameworks such as XFRM), so the general trend is that IPsec-family protocols and WireGuard tend to outperform OpenVPN on the performance front.

How These Are Actually Used in Practice: Protocol-by-Protocol Pros and Cons

“WireGuard is the simplest and fastest” is technically correct, but in real-world deployments, IKEv2/IPsec and OpenVPN both remain in wide use. Looking at the pros and cons that fall out of each protocol’s design explains why this split persists.

In other words, the real-world choice comes down not to a simple performance comparison but to operational requirements: whether you want to run on OS-native clients, whether connectivity from restrictive networks is a hard requirement, and where user-level access management should live. In recent years, more enterprises have also been migrating toward ZTNA (Zero Trust Network Access) services like Zscaler Private Access or Cloudflare Access, on top of these VPN protocols — but the underlying transport for those services is frequently built on IPsec or WireGuard technology too, so understanding the characteristics of each protocol covered here remains directly relevant.

Selection Criteria for Enterprise Deployment

No protocol is “unconditionally the best”—the right answer depends on your requirements.

Selection CriterionBest-Fit ProtocolWhy
Wanting to operate using only the standard clients built into Windows/iOS/macOS/AndroidIKEv2/IPsecNo need to install additional client apps, and it tends to receive long-term support as a native OS feature
Prioritizing connectivity from restrictive networks (hotels, public Wi-Fi, etc.)OpenVPN (configured for TCP 443)Can disguise itself as ordinary HTTPS traffic, making it easier to connect even where UDP/ESP is blocked
Prioritizing top performance and a simple setup in a self-hosted environmentWireGuardSimple, fast implementation with few configuration items and low operational overhead
Stuck with an existing commercial VPN appliance that only supports L2TP/IPsecL2TP/IPsec (certificate-based authentication + Main Mode mandatory)Keeps existing assets in use while operating in a configuration that avoids the known weaknesses

Even if you can’t immediately replace an existing L2TP/IPsec environment, most of its known weaknesses can be mitigated in practice by moving away from a shared pre-shared key toward certificate-based authentication and by pinning IKE Phase 1 to Main Mode. In many cases, hardening the weak points of the current setup takes priority over a wholesale protocol migration.

The Thought Process for Actually Designing and Proposing a Solution

The table above maps representative conditions to conclusions, but real-world requirements combine several conditions at once, so memorizing the table alone won’t help you map an unfamiliar set of requirements onto the right answer. Working through the following five questions, in this order, lets you propose a solution backed by requirements-driven reasoning — not “because it’s newer” or “because I’ve heard of it.”

  1. Are clients limited to company-issued, managed devices, or do they include personal devices and partner-company PCs too? If it’s the former, IKEv2/IPsec’s operational ease — auto-distributing certificates via MDM and SCEP — pays off. If it’s the latter, the cost of distributing and version-managing a client app becomes central to the decision.
  2. Do you need fine-grained, per-user or per-application access control? If the requirement is granular enough that “this department gets access to only this SaaS app,” it’s worth considering a ZTNA service (covered in depth in What Is ZTNA?) instead of a bare VPN protocol — it saves you from having to build that ACL logic yourself later.
  3. Does the set of source networks include restrictive ones that block UDP/ESP? Hotels, overseas travel, some public Wi-Fi — if these are in scope, OpenVPN’s ability to fall back to TCP 443 makes it a strong candidate (the details of how that connection gets established are covered in How OpenVPN Works Internally).
  4. What protocols does the existing VPN appliance or firewall actually support? Even if a newer protocol is technically superior, if the existing assets only support L2TP/IPsec or IKEv2/IPsec, you need to weigh the ROI of a wholesale migration.
  5. Is performance and low operational overhead in a self-hosted environment the top priority? For an individual or small organization chasing maximum speed and a minimal setup, WireGuard — or a wrapper product on top of it if you also want IdP integration (covered in How Tailscale Works) — becomes the first candidate.
graph TD
    Start["Designing or revisiting<br/>a remote-access VPN"] --> Q1{"Are clients limited to<br/>company-managed devices?"}
    Q1 -->|"Yes"| Q2{"Prioritize ease of operation<br/>with OS-native clients?"}
    Q1 -->|"No (BYOD/partner PCs included)"| Q4{"Need fine-grained<br/>per-user/per-app access control?"}
    Q2 -->|"Yes"| R1["IKEv2/IPsec<br/>(auto-distribute certs via MDM+SCEP)"]
    Q2 -->|"No (want max speed, self-hosted)"| R2["WireGuard"]
    Q4 -->|"Yes"| R3["ZTNA service<br/>(built on IPsec/WireGuard internally)"]
    Q4 -->|"No"| Q5{"Must connect from restrictive<br/>networks (hotels, public Wi-Fi)?"}
    Q5 -->|"Yes"| R4["OpenVPN (TCP 443 configuration)"]
    Q5 -->|"No"| R2

The core of this thought process is pinning down “who needs access to what, from where” first, and working backward to the protocol — not starting from “which protocol is technically superior.” Choosing based purely on technical merit tends to surface problems later, during operations, that were easy to overlook at the design stage — “we have no way to distribute certificates,” or “we can’t connect from this one specific site.”

Common Misconceptions and Pitfalls

Troubleshooting Perspective

Trouble during a protocol migration or connectivity issues on mobile networks are best approached by asking “which event is this particular protocol’s design weak against?”

  1. Connection failures in an environment where protocols are mixed during a migration period: If some clients use the old protocol (L2TP/IPsec) and others use the new one (e.g., IKEv2/IPsec), check whether both protocols are enabled simultaneously on the VPN server side, and whether the corresponding firewall rules (UDP 500/1701/4500, or IKEv2-specific settings) are correctly separated for each.
  2. Frequent disconnects when switching between mobile data and Wi-Fi: Under IKEv1-based IPsec without MOBIKE support (including L2TP/IPsec), every IP address change tends to trigger a full reconnection from Phase 1, which is often perceived by the user as a disconnect. Whether switching to IKEv2 (with MOBIKE enabled) or WireGuard improves the situation is one useful diagnostic signal.
  3. Unable to connect only from certain networks (hotels, cafes, etc.): This strongly suggests UDP or ESP (protocol number 50) is being blocked. Whether a configuration that can “disguise itself as ordinary HTTPS traffic,” like OpenVPN over TCP 443, is available makes a real difference in connectivity in these environments.

Prevention and Long-Term Countermeasures

Summary

Starting Today

  1. When selecting or reevaluating a VPN protocol, organize your requirements along three axes—client types, network environment constraints, and whether mobile usage is involved—before comparing options.
  2. If an L2TP/IPsec environment is still in place, don’t wait for a full migration—start with the immediately effective steps: switching to certificate-based authentication and strictly enforcing Main Mode.

References

Comments

Feel free to leave thoughts, questions, or corrections below (sign in with a GitHub account to comment or react).