Head-to-head
| Feature | OpenVPN | IKEv2 (with IPsec) |
|---|---|---|
| First released | 2001 | 2005 (RFC 4306); current standard RFC 7296, 2014 |
| How data moves | User-space program (kernel offload optional) | IPsec in the operating system kernel |
| Transport | UDP or TCP, any port, including TCP 443 | UDP only, ports 500 and 4500 |
| Built into the OS | No: an app or plug-in on every platform | Windows, macOS, iOS, iPadOS, Android 11 and later |
| Changing networks | Reconnects | Keeps the session (MOBIKE, RFC 4555) |
| Through restrictive networks | Good: TCP 443 looks like HTTPS | Poor: two well-known UDP ports to block |
| Ciphers | Negotiated over TLS; AES-GCM or ChaCha20-Poly1305 today | Negotiated in IKE; AES-GCM typical |
| Throughput (whitepaper test) | 258 Mbps | 825 to 881 Mbps (IPsec, the data path IKEv2 sets up) |
| Ping (same test) | 1.541 ms | 0.501 to 0.508 ms |
The throughput and ping rows come from the benchmark in the WireGuard whitepaper: iperf3 between two laptops on gigabit Ethernet, OpenVPN in UDP mode with AES-256 and HMAC-SHA2-256, IPsec with ChaCha20-Poly1305 and with AES-256-GCM. The test is old, and WireGuard's own site says the protocols have gotten faster since; the gap between a user-space program and the kernel is the part that has not changed.
What IKEv2 actually is
IKEv2 is the key exchange. It authenticates the two ends, agrees the ciphers and sets up the tunnel; the data itself then travels inside IPsec, encrypted and authenticated by the operating system's network stack. That split is why “IKEv2” on a settings screen means a full VPN, and why its speed is really IPsec's speed. The protocol was first published in December 2005 and its current version, RFC 7296, in October 2014.
Speed: the kernel wins
OpenVPN traditionally runs as a program outside the kernel. Every packet is handed from the kernel to the program, encrypted, and handed back, in both directions, and each hand-over costs a copy and a context switch. IPsec does its work inside the kernel, where the packets already are. In the whitepaper benchmark that difference was a factor of three in throughput and about three times the ping. OpenVPN's answer is Data Channel Offload, an optional kernel module that moves the data path into the kernel; it is on by default only in recent OpenVPN Access Server installs, not in most consumer setups.
Two things make OpenVPN slower still: TCP mode, where TCP inside TCP retransmits twice when a packet is lost, and the handshake, a full TLS exchange followed by OpenVPN's own key negotiation, which takes several round trips on a slow link.
Compatibility: IKEv2 is already on your device
- Windows: the built-in VPN client supports IKEv2, L2TP, PPTP and SSTP. OpenVPN needs its own app or a plug-in.
- macOS, iOS and iPadOS: Apple's VPN configuration supports IKEv2, IPsec and L2TP. No app required for IKEv2; OpenVPN always needs one.
- Android: since Android 11, the platform includes an IKEv2/IPsec VPN profile. OpenVPN needs an app on every version.
In practice a VPN service gives you an app either way, and the app picks the protocol. The built-in support matters when you cannot install apps, on a work laptop for example, or when you want a tunnel to your own server with no software to trust.
Networks: where each one fails
IKEv2 uses UDP port 500 for the exchange and UDP port 4500 when it has to pass through a home router (NAT traversal). Both are well known, and corporate, hotel and campus networks sometimes block them, which stops IKEv2 outright. OpenVPN can run over TCP port 443, the port every HTTPS website uses, so a network that wants to block it has to look much harder. This is the single reason OpenVPN is still worth having.
When you walk out of Wi-Fi range and your phone switches to mobile data, IKEv2 keeps the session alive through MOBIKE, its mobility extension: in the words of RFC 4555, a mobile client “could use MOBIKE to keep the connection with the VPN gateway active while moving from one address to another”. OpenVPN notices the new address and reconnects, which takes a few seconds.
Security: both strong, differently
Both are standard, reviewed protocols with no known practical break when configured with modern ciphers. OpenVPN leans on TLS and the OpenSSL library, which means a large and battle-tested codebase and a large surface to audit. IKEv2 relies on certificates or EAP for authentication, which is powerful and easy to get wrong when you set it up yourself; a VPN provider does that work for you. Neither protocol hides the fact that you are using a VPN: an obfuscation layer, where it exists, sits on top of either.
Which should you use?
- Choose IKEv2 on a phone or laptop where the VPN app offers it: fast, built in, and it survives network changes.
- Choose OpenVPN on a network that blocks UDP, or when a captive portal or firewall lets only web traffic through: TCP port 443 is your way out.
- Choose WireGuard when it is available: it is faster than both, with under 4,000 lines of code to audit, and it roams between networks like IKEv2 does. It is what GhostShield VPN runs in every app.
Try WireGuard instead
GhostShield VPN runs WireGuard with ChaCha20-Poly1305 on Windows, Mac, iPhone, iPad, Android and Google TV, with a 7-day free trial of every feature. See how the free trial works, or compare the protocols on WireGuard vs OpenVPN and WireGuard vs IKEv2.
Questions people ask
Is IKEv2 better than OpenVPN?
For most people on a phone or laptop, yes: IKEv2 is built into Windows, macOS, iOS, iPadOS and Android 11 and later, its data path runs in the operating system kernel, and it reconnects on its own when you move between Wi-Fi and mobile data. OpenVPN wins on one thing: it can run over TCP port 443, so it works on networks that block the UDP ports IKEv2 needs.
Which is the best VPN protocol?
There is no single best one. WireGuard is the fastest and simplest and is what most VPN services, GhostShield VPN included, now use. IKEv2 is the best choice when you want to use the VPN client built into your operating system. OpenVPN is the one to keep for networks that block UDP, because it can disguise itself as ordinary HTTPS traffic on TCP port 443.
Why is OpenVPN so slow?
OpenVPN traditionally runs as a user-space program, so every packet is copied between the kernel and the program twice, and its connection starts with a full TLS handshake followed by its own key exchange. In the WireGuard whitepaper benchmark it managed 258 Mbps where IPsec reached 825 to 881 Mbps on the same gigabit link. TCP mode makes it slower still, because TCP inside TCP retransmits twice. OpenVPN’s Data Channel Offload module moves the data path into the kernel and closes much of the gap, but it is optional.
Is OpenVPN going away?
No. The 2.6 series is maintained and still widely used: the copy we installed for this article reports version 2.6.19 with Data Channel Offload support built in. What has changed is that new VPN services choose WireGuard first and keep OpenVPN as the fallback for restrictive networks.
Is IKEv2 secure?
Yes, when it is set up with modern ciphers such as AES-GCM and proper certificates. It is a standard (RFC 7296, 2014) that has been reviewed for two decades and is used by enterprises and operating-system vendors. Its weak points are configuration mistakes, which a VPN provider handles for you, and the fact that it is easy for a network to block by closing UDP ports 500 and 4500.
Does IKEv2 work on iPhone?
Yes. iOS and iPadOS support IKEv2 natively through the VPN configuration payload, alongside IPsec and L2TP, so an IKEv2 VPN can be set up without installing an app. OpenVPN on an iPhone always needs an app.
Does GhostShield VPN use OpenVPN or IKEv2?
Neither. GhostShield VPN uses WireGuard with ChaCha20-Poly1305 encryption in every app, because it is faster than both and small enough to audit. You can read why on the WireGuard vs OpenVPN page.
Sources
- RFC 7296, Internet Key Exchange Protocol Version 2 (IKEv2), October 2014
- RFC 4555, IKEv2 Mobility and Multihoming Protocol (MOBIKE)
- Microsoft Learn: VPN connection types in Windows (IKEv2, L2TP, PPTP, SSTP built in)
- Apple Platform Deployment: VPN overview (IKEv2, IPsec and L2TP payloads)
- Android developers: Ikev2VpnProfile, added in API level 30 (Android 11)
- WireGuard whitepaper by Jason A. Donenfeld: the OpenVPN and IPsec benchmark
- OpenVPN Access Server docs: Data Channel Offload
- Wikipedia: Internet Key Exchange (ports, RFC history)