VPN protocols explained: WireGuard, OpenVPN, IKEv2

What a VPN really does, how protocols and encryption work, and what "no logs" actually means — the ground floor before you spend a euro.

10 min read

What VPN protocols actually do

When you connect to a VPN, your device and the VPN server negotiate how to build the encrypted tunnel between them. The ruleset governing that negotiation—how to authenticate, which encryption to use, how to handle dropped packets—is the protocol. Think of it as the blueprint for the tunnel itself.

The protocol determines speed, security, stability, and how well the connection survives network changes (switching from Wi-Fi to cellular, for example). Most VPN services offer several protocols, and the "best" choice depends on your threat model and network conditions. Here's what you need to know about the three you'll encounter most often.

WireGuard: the new default

WireGuard launched in 2020 and rapidly became the protocol of choice for modern VPN services. It's approximately 4,000 lines of code—compare that to OpenVPN's 70,000+ lines. Less code means fewer places for bugs to hide and easier security audits.

In practice, WireGuard is noticeably faster than older protocols. You'll see this most clearly on mobile connections and high-latency routes (connecting from Europe to Asia, for example). The protocol handles network roaming efficiently: when your phone switches from Wi-Fi to cellular, a WireGuard connection typically recovers in under a second. OpenVPN often takes 10-30 seconds or drops entirely.

The cryptography is fixed. WireGuard uses ChaCha20 for encryption, Poly1305 for authentication, and Curve25519 for key exchange—no negotiation, no legacy cipher support. This opinionated design removes entire classes of downgrade attacks. You can't accidentally end up on a weak cipher because the protocol doesn't offer weak ciphers.

The trade-off: WireGuard was designed to store peer IP addresses in memory, which conflicts with the VPN industry's "no logs" marketing. Most commercial VPNs address this with custom implementations. NordVPN's NordLynx, for example, uses a double-NAT system that assigns temporary internal IPs to avoid logging your real address. Mullvad solved it differently by generating ephemeral keys tied to account numbers rather than IP addresses.

When to use WireGuard: It should be your default. The only scenario where you'd skip it is if you're connecting from a heavily firewalled network (corporate, university, or restrictive country) that blocks UDP traffic on non-standard ports.

OpenVPN: the reliable fallback

OpenVPN has been the industry standard since 2001. It's open-source, extensively audited, and works almost everywhere. Most VPN services still offer it as a fallback, and for good reason—it's proven technology that handles difficult network conditions well.

OpenVPN comes in two transport flavors: UDP (faster, preferred) and TCP (slower, more reliable). UDP sends packets without waiting for acknowledgment, which reduces latency but means lost packets stay lost. TCP ensures every packet arrives and reassembles them in order, but the overhead slows things down—sometimes significantly on poor connections.

Here's a practical example: streaming video over OpenVPN UDP works fine until packet loss hits 3-5%, then you'll see buffering. Switch to TCP and the stream smooths out, but you might drop from 1080p to 720p because TCP's retransmission overhead eats bandwidth.

The protocol's flexibility is both strength and weakness. OpenVPN supports dozens of cipher combinations, which means you can tune security vs. performance—but it also means misconfiguration is possible. Consumer VPN services handle this for you with sane defaults (typically AES-256-GCM for encryption and SHA-256 for authentication), but if you're auditing a provider, check what they're actually using, not just what they claim to support.

Firewall evasion is OpenVPN's killer feature. Run it over TCP port 443 (the same port as HTTPS traffic) and it becomes difficult to detect or block without breaking regular web browsing. This makes OpenVPN the protocol of choice in restrictive environments, though you'll pay for that stealth with reduced performance compared to WireGuard.

When to use OpenVPN: When WireGuard is blocked, when you need TCP for stability on flaky connections, or when connecting to older VPN infrastructure that doesn't support newer protocols. Also useful if you're routing through multiple hops—many multi-hop VPN configurations still rely on OpenVPN because the technology is mature and well-documented.

IKEv2/IPsec: the mobile specialist

Internet Key Exchange version 2 (IKEv2) is technically just the authentication and key negotiation layer; it runs on top of IPsec, which handles the actual encryption. The combination is built into iOS, macOS, and Windows, which means no third-party app required—though most VPN services still provide custom apps for better UX.

IKEv2's standout feature is the MOBIKE extension (Mobility and Multihoming). When your device changes networks, MOBIKE re-establishes the VPN connection almost instantly without dropping active sessions. This makes IKEv2 particularly well-suited to mobile devices that switch between cellular and Wi-Fi frequently.

The protocol is fast—not quite WireGuard fast, but noticeably quicker than OpenVPN. It typically uses AES-256 for encryption and SHA-256+ for authentication, similar to OpenVPN's defaults, but the implementation is more efficient because it operates at the kernel level rather than in userspace.

The trust question matters here more than with other protocols. While the core IKEv2/IPsec specifications are open, many implementations (particularly those from large vendors) are closed-source or rely on platform-specific cryptographic libraries you haven't audited. This doesn't make IKEv2 insecure—it's used by governments and enterprises precisely because it's robust—but it does mean you're trusting your OS vendor's implementation.

Some VPN providers push IKEv2 as their default on mobile platforms because it's fast and the built-in client reduces app complexity. That's reasonable for most users, but if your threat model includes state-level adversaries or zero-trust requirements, the proprietary implementation elements may be a concern.

When to use IKEv2: On mobile devices when WireGuard isn't available or when you specifically need seamless network roaming (commuters switching between cellular towers and home Wi-Fi, for example). Also useful on BlackBerry and older mobile platforms where modern protocol support is limited.

Proprietary protocols: read the fine print

Some VPN services develop custom protocols—ExpressVPN's Lightway, Hotspot Shield's Catapult Hydra, and others. These exist in a murky space between innovation and vendor lock-in.

The best proprietary protocols are actually well-documented and audited. Lightway, for instance, is open-source, uses wolfSSL for cryptography, and has undergone third-party security audits. The code is available for review, which addresses the major transparency concern.

The worst proprietary protocols are marketing smoke. If a VPN touts a "proprietary protocol" but won't explain the cryptographic primitives it uses, won't publish code, and hasn't commissioned independent audits, treat it as a red flag. You're being asked to trust security-critical code you can't inspect—the opposite of how privacy tools should work.

How to evaluate proprietary protocols: Check if the code is published (even if not fully open-source). Look for third-party security audits from reputable firms (Cure53, Trail of Bits, NCC Group). Verify the protocol specifies its cryptographic components—which cipher, which hash function, which key exchange mechanism. If the provider can't or won't answer these questions, use their OpenVPN or WireGuard option instead.

Protocol performance in practice

Raw speed tests show WireGuard consistently ahead, but real-world performance depends on distance, congestion, and network quality. Here's how to test yourself:

Connect to a server in the same city using each protocol and run a speed test (fast.com or speedtest.net). Note the baseline. Then connect to a server 3,000+ miles away and test again. WireGuard's advantage typically grows with distance because its leaner overhead preserves more bandwidth on high-latency routes.

Try the network roaming test: start streaming video on Wi-Fi, walk outside until your phone switches to cellular, note how long before the stream continues. WireGuard and IKEv2 typically recover in 1-3 seconds. OpenVPN UDP often drops the connection entirely; TCP might hold on but freeze the stream for 10-20 seconds.

Test firewall evasion on your actual network—university, office, hotel Wi-Fi, or restrictive country if relevant. Try WireGuard first (it usually works), then OpenVPN UDP, then OpenVPN TCP on port 443. Document what succeeds because you'll need that information when traveling.

Platform support matters more than protocol specs

WireGuard support is now ubiquitous in VPN apps but varies at the OS level. Linux and Android kernels include native WireGuard modules. iOS and macOS run it in userspace, which is slightly slower but still faster than OpenVPN. Windows support exists but implementation quality varies by VPN provider.

OpenVPN requires third-party software on every platform, which means you're trusting the VPN provider's app implementation. This isn't automatically bad—most major providers have had their apps audited—but it adds a dependency layer between you and the protocol.

IKEv2 is built into Apple and Microsoft operating systems, which means you can configure it manually without installing VPN software. This can be useful if you don't trust VPN apps or need to connect from a locked-down system. The downside: you lose features like kill switches, split tunneling, and automatic server selection that VPN apps provide.

For routers and network-level VPN deployment, OpenVPN has the broadest support. WireGuard is rapidly catching up—most recent router firmware includes it—but if you're running older hardware, OpenVPN may be your only option. Tomato firmware and dd-wrt both support WireGuard now, but implementation quality varies by router chipset.

What "military-grade encryption" actually means (spoiler: marketing)

You'll see VPN marketing reference "military-grade 256-bit encryption" constantly. This refers to AES-256, which is indeed used by militaries, but it's also the standard for securing everything from your online banking to encrypted hard drives. The phrase sounds impressive and means almost nothing.

What actually matters: the cipher (AES-256, ChaCha20), the mode (GCM, CBC), the hash function (SHA-256, SHA-512, Poly1305), and the key exchange mechanism (RSA, Curve25519, Diffie-Hellman). All three protocols discussed here use strong cryptographic primitives when properly implemented.

WireGuard's advantage isn't that it uses "better" encryption—AES-256 and ChaCha20 are both strong enough that brute-forcing them is computationally infeasible. The advantage is that WireGuard's simpler codebase is easier to audit and harder to misconfigure. Fewer options means fewer opportunities to accidentally weaken security.

If you're auditing a VPN provider's security claims, ignore the "military-grade" marketing and look for specifics: Which cipher? Which hash? What key length? Has the implementation been audited? Are perfect forward secrecy and authenticated encryption enabled? These technical details matter; the military metaphor doesn't.

Switching between protocols: when and how

Most VPN apps let you change protocols in settings—usually under "Connection" or "Advanced." The interface varies by provider, but the concept is standard: select protocol, reconnect, test.

Switch to WireGuard if: you're currently using OpenVPN and want better performance, you're on mobile and experience frequent disconnects, or you're connecting internationally and need lower latency.

Switch to OpenVPN TCP if: WireGuard and UDP protocols are blocked, you're on unstable Wi-Fi with high packet loss, you need maximum stealth (TCP 443), or you're troubleshooting connection stability issues.

Switch to IKEv2 if: you're on iOS/macOS and prefer native client integration, you commute and need seamless network roaming, or WireGuard isn't available and you want better performance than OpenVPN.

The kill switch behavior differs by protocol. WireGuard and OpenVPN kill switches typically operate at the firewall level, blocking all traffic when the tunnel drops. IKEv2 kill switches may use OS-level routing instead, which can leak during the reconnection window on some platforms. Test your kill switch after changing protocols—disconnect the VPN mid-stream and verify traffic stops.

The protocol choice isn't permanent

Unlike choosing a VPN service (which often involves a subscription commitment), switching protocols is instant and free. Start with WireGuard. If you hit problems—blocked connections, instability, compatibility issues—switch to OpenVPN UDP, then TCP if needed. Treat IKEv2 as the mobile specialist: great on phones, less necessary on desktop.

Your optimal protocol will change based on location and network. WireGuard works perfectly at home but might be blocked at the office. OpenVPN TCP is slow on clean connections but essential on congested hotel Wi-Fi. Build a mental map of what works where, and be ready to adapt.

The VPN protocol is infrastructure, not identity. Use whichever one solves your immediate problem—performance, stability, or evasion—and change it when circumstances change. That flexibility is the point.

Key takeaways

  • WireGuard should be your default: faster, simpler code, modern cryptography with no legacy baggage. Use it unless you have a specific reason not to.
  • OpenVPN TCP on port 443 defeats most blocks: slower than other options but looks like HTTPS traffic, making it effective in restrictive environments.
  • IKEv2 excels at network roaming: ideal for mobile users who frequently switch between Wi-Fi and cellular without dropping connections.
  • Proprietary protocols need public audits: if the code isn't published and independently reviewed, stick to proven open protocols instead.
  • Test protocols yourself on your actual networks: speed and stability vary dramatically by location, ISP, and local firewall rules—no article can predict your specific conditions.
  • Protocol security is mostly solved: all three major protocols use strong cryptography; differences lie in implementation quality, performance characteristics, and stealth capabilities, not raw encryption strength.