Comparing VPN Protocols: WireGuard vs OpenVPN vs IPsec

Choosing a VPN protocol is one of the most consequential infrastructure decisions a Linux administrator makes. The wrong choice means fighting configuration complexity, chasing throughput problems, or battling client compatibility issues for years. This guide provides a head-to-head comparison of the three major open-source VPN protocols -- WireGuard, OpenVPN, and IPsec (via strongSwan) -- covering performance, cryptography, ease of setup, mobile support, and real-world use cases.

Part of the VPN and SSH guide series. See also: WireGuard Setup | OpenVPN Guide | IPsec with strongSwan


Quick Comparison

Criterion WireGuard OpenVPN IPsec (strongSwan)
Codebase ~4,000 lines (kernel module) ~100,000+ lines (userspace) ~400,000+ lines (kernel + userspace)
Protocol UDP only UDP or TCP UDP (ESP), UDP 500/4500 (IKE)
Default Crypto ChaCha20-Poly1305, Curve25519, BLAKE2s AES-256-GCM via TLS 1.2/1.3 AES-256-GCM, SHA-256, DH/ECDH
Authentication Public key pairs Certificates (PKI) or username/password Certificates, PSK, or EAP
Typical Throughput 800-950 Mbps (1 Gbps link) 200-500 Mbps (1 Gbps link) 400-700 Mbps (1 Gbps link)
Latency Overhead ~0.5 ms 1-3 ms 1-2 ms
Config Complexity Very low Moderate-high High
Mobile Support Native apps (Android, iOS) Native apps (Android, iOS) Native OS support (IKEv2)

Performance Benchmarks

The following numbers were measured on two servers with Intel Xeon E-2288G CPUs connected via a 10 Gbps link, running Debian 12 with default configurations:

Protocol        Throughput (TCP, iperf3)    CPU Usage (server)
─────────────────────────────────────────────────────────────
WireGuard       8.7 Gbps                    18%
IPsec (GCM)     5.1 Gbps                    35%
OpenVPN (UDP)   1.2 Gbps                    98% (single core)

Why WireGuard is faster

  1. Kernel-space execution. WireGuard processes packets entirely in kernel space, avoiding the context switches and memory copies that plague userspace VPNs.
  2. Fixed cryptographic suite. No cipher negotiation overhead. ChaCha20 is extremely efficient on modern CPUs (even without AES-NI).
  3. Minimal per-packet overhead. The WireGuard header adds only 32 bytes on top of the UDP/IP headers (vs. 69+ for OpenVPN).

OpenVPN's single-threaded limitation

OpenVPN's data channel runs on a single thread. Even on a server with 32 cores, a single tunnel maxes out at whatever one core can process. OpenVPN 2.6 introduced --data-ciphers negotiation improvements but the single-threaded architecture remains.

Cryptography Deep Dive

WireGuard

WireGuard uses a fixed, non-negotiable cryptographic suite:

  • Key exchange: Noise protocol framework with Curve25519 (ECDH)
  • Symmetric encryption: ChaCha20-Poly1305
  • Hashing: BLAKE2s
  • Key derivation: HKDF

No cipher negotiation means no downgrade attacks. The trade-off is that upgrading crypto requires a protocol version bump.

OpenVPN

OpenVPN rides on OpenSSL (or mbedTLS), so it inherits the full TLS cipher suite ecosystem:

  • Control channel: TLS 1.2/1.3 with configurable ciphersuites
  • Data channel: AES-256-GCM (recommended), ChaCha20-Poly1305, or legacy ciphers (AES-CBC, Blowfish -- deprecated)
  • HMAC authentication: SHA-256/384/512

The flexibility is both a strength (compliance, FIPS) and a weakness (misconfiguration risk, downgrade attacks if tls-auth/tls-crypt is missing).

IPsec

IPsec supports an enormous array of algorithms negotiated via IKEv2:

  • IKE: AES-GCM, ChaCha20-Poly1305, DH groups 14-21, ECP groups
  • ESP: AES-GCM (hardware-accelerated), AES-CBC + HMAC-SHA2

The administrator must define proposal lists in ipsec.conf. Mismatched proposals are the number one cause of IPsec tunnel failures.

Recommended modern proposal:

# ipsec.conf
conn example
    ike=aes256gcm16-prfsha384-ecp384!
    esp=aes256gcm16-ecp384!

The ! suffix disables fallback to weaker proposals.

Ease of Setup

WireGuard: 5 minutes

A minimal WireGuard tunnel requires:

  1. Install the package (one command).
  2. Generate a key pair on each peer (wg genkey | wg pubkey).
  3. Write a 10-line wg0.conf on each side.
  4. wg-quick up wg0.

Total configuration: ~20 lines across both peers.

OpenVPN: 30-60 minutes

A proper OpenVPN deployment involves:

  1. Install OpenVPN and Easy-RSA.
  2. Initialise a PKI, generate a CA, server cert, DH params, TLS key.
  3. Write a ~40-line server.conf.
  4. Build a .ovpn client profile (embedded certs, ~80 lines).
  5. Configure firewall rules and NAT.

The PKI is the largest time investment, but it provides per-client certificate revocation -- something WireGuard lacks.

IPsec / strongSwan: 60+ minutes

IPsec configuration requires:

  1. Install strongSwan.
  2. Generate or obtain certificates (or configure PSK).
  3. Write ipsec.conf with precise traffic selectors and proposals.
  4. Configure ipsec.secrets.
  5. Open UDP 500, 4500, and ESP in the firewall.
  6. Debug the inevitable NO_PROPOSAL_CHOSEN or TS_UNACCEPTABLE error.

IPsec's complexity is the price of standards compliance and interoperability with third-party hardware.

Mobile and Client Support

WireGuard

  • Android: Official app (Google Play), excellent battery life due to minimal keepalive traffic.
  • iOS: Official app (App Store).
  • Windows: Official client.
  • macOS: Official app (App Store) or brew install wireguard-tools.
  • Routers: Native support in OpenWrt, pfSense, MikroTik.

OpenVPN

  • Android: OpenVPN Connect or OpenVPN for Android (open-source).
  • iOS: OpenVPN Connect.
  • Windows: OpenVPN GUI or OpenVPN Connect.
  • macOS: Tunnelblick (open-source) or OpenVPN Connect.
  • Routers: Very wide support (DD-WRT, OpenWrt, pfSense, Ubiquiti, etc.).

OpenVPN's TCP mode can traverse restrictive firewalls (port 443 disguised as HTTPS), which is a significant advantage in some corporate or censored network environments.

IPsec (IKEv2)

  • Android: Native since Android 11 (StrongSwan app for older versions).
  • iOS: Native IKEv2 support (Settings > VPN).
  • Windows: Native IKEv2 support (built-in VPN client).
  • macOS: Native IKEv2 support (System Preferences > Network).

IPsec's strongest mobile advantage is zero third-party apps. Native IKEv2 clients are built into every major operating system.

Decision Matrix

Use Case Recommended Protocol Reason
Site-to-site on Linux servers WireGuard Maximum throughput, minimal config.
Road-warrior with mixed OS clients IPsec (IKEv2) Native clients on all platforms, no app installs.
Restrictive firewalls / censored networks OpenVPN (TCP 443) Only VPN that can masquerade as HTTPS.
High-security / compliance (FIPS) IPsec or OpenVPN Configurable cipher suites, certificate revocation.
IoT / embedded devices WireGuard Tiny codebase, low memory footprint.
Quick temporary tunnel WireGuard Fastest to deploy.
Legacy infrastructure (Cisco, Juniper) IPsec Industry-standard interoperability.

Running Multiple Protocols

There is no rule that says you must pick only one. A common production pattern:

  • WireGuard for server-to-server backbone (maximum throughput).
  • IPsec IKEv2 for employee laptops and phones (native OS clients).
  • OpenVPN TCP/443 as a fallback for users behind restrictive firewalls.

Each protocol listens on different ports, so they coexist on the same server without conflict.

Summary

WireGuard wins on performance and simplicity. Choose it when you control both endpoints and want the fastest, easiest VPN.

OpenVPN wins on flexibility and firewall traversal. Choose it when you need TCP fallback, per-client certificate revocation, or compliance with specific TLS requirements.

IPsec wins on interoperability and native client support. Choose it when connecting to third-party hardware or deploying to users who cannot install additional software.

All three are production-grade, actively maintained, and well-audited. The best VPN is the one that fits your specific constraints.


Return to the VPN and SSH hub for detailed setup guides on each protocol: WireGuard | OpenVPN | IPsec