What IPsec is, and what WireGuard is
IPsec is not one protocol but a suite. ESP (RFC 4303) encrypts and authenticates each packet inside the operating system's network stack; IKE, today IKEv2 (RFC 7296), authenticates the two ends and sets up the keys. It has tunnel and transport modes, dozens of cipher combinations and a long list of options, which is why it is powerful in enterprise networks and painful to set up by hand.
WireGuard is one protocol with one packet format, one handshake and one set of ciphers. Its Linux implementation is under 4,000 lines of code, excluding the cryptographic primitives, and it has been in the Linux kernel since version 5.6 in March 2020. Its author built it as a simpler, faster replacement for both IPsec and OpenVPN.
The IPsec family: IKEv2, L2TP/IPsec and IKEv1
IPsec is the encryption; the name people see on their device is usually the protocol around it. Three versions come up again and again:
- IKEv2/IPsec is the current pair and what most people mean by “an IPsec VPN” today. IKEv2 (RFC 7296) handles the handshake and the rekeying, ESP does the encryption, and it is the profile offered by the built-in VPN clients on Windows, macOS, iOS and Android.
- L2TP/IPsec wraps L2TP, which builds the tunnel but encrypts nothing by itself, inside IPsec for the encryption. It is the older of the two and still appears in the same built-in client lists, which is why so many setup guides still mention it.
- IKEv1/IPsec is the earlier key exchange. It still runs in older firewalls and routers, and it is the version whose long option list gave IPsec its reputation for being easy to misconfigure.
So “WireGuard vs IPsec” is really “WireGuard vs IKEv2/IPsec”. The comparison below is about that pair.
The benchmark: WireGuard vs IPsec vs OpenVPN
| Protocol and ciphers | Throughput | Ping |
|---|---|---|
| WireGuard, ChaCha20-Poly1305 | 1,011 Mbps | 0.403 ms |
| IPsec, ChaCha20-Poly1305 | 825 Mbps | 0.501 ms |
| IPsec, AES-256-GCM (with AES-NI) | 881 Mbps | 0.508 ms |
| OpenVPN, AES-256 with HMAC-SHA2-256, UDP | 258 Mbps | 1.541 ms |
From the WireGuard whitepaper: iperf3 between an Intel Core i7-3820QM and an i7-5200U on gigabit Ethernet, averaged over 30 minutes. WireGuard filled the link while the processor was not fully busy; OpenVPN and IPsec ran it at 100%. WireGuard's site says the benchmark is old and that both WireGuard and IPsec have gotten faster since, with WireGuard still ahead in some cases thanks to multi-threading, while OpenVPN “remains extremely slow”.
The IPsec figures above are from 2017, and we have not re-run them. Our own 2026 run measured WireGuard against OpenVPN on a current kernel — 1,280 Mbps against 374 — and published the method, the raw results and the script. The numbers are on the WireGuard vs OpenVPN benchmark page, so you can rerun it yourself.
Why the numbers come out that way
IPsec and WireGuard both run in the kernel, so the gap between them is small and comes from design: WireGuard's handshake takes one round trip, there is no cipher negotiation, and ChaCha20 is fast in plain software. IPsec with AES-GCM is close on hardware with AES acceleration, as the table shows. OpenVPN runs as a user-space program, so every packet crosses the kernel boundary twice; that is the factor-of-three gap, and it is why OpenVPN added its optional Data Channel Offload module.
OpenVPN vs IPsec
People searching for this usually mean “which one should my VPN use”. IPsec is faster and built into the operating system; OpenVPN needs an app but can run over TCP port 443, so it gets through networks that block the UDP ports IPsec needs (500 and 4500). For a work network with a firewall you do not control, OpenVPN over TCP is the safer bet; everywhere else, IPsec or WireGuard. The OpenVPN vs IKEv2 page covers this pair in detail.
WireGuard vs IPsec for site to site
Site to site is where IPsec still earns its place. Most enterprise firewalls and routers speak it, it can authenticate both ends with certificates, and IKEv2 rekeys without anyone touching the boxes. WireGuard can build the same tunnel — it is peer to peer by design, so a site-to-site link is just two peers that know each other's public keys — and it is simpler to reason about, but the hardware in the middle is less likely to support it out of the box and it runs on UDP only. If an IT team manages the link, IPsec is the safe choice. If you control both ends and want the smallest configuration that works, WireGuard is enough.
Mobile, roaming, NAT and firewalls
WireGuard identifies a peer by its public key, not by its address, so a phone that moves from Wi-Fi to mobile data keeps its tunnel without renegotiating. IKEv2 has its own answer, MOBIKE (RFC 4555), which lets an IPsec tunnel follow the device. Both pass through NAT in practice: IPsec wraps ESP in UDP port 4500 when it detects NAT, and WireGuard is a single UDP flow. What differs is the firewall. IPsec wants UDP ports 500 and 4500 open; WireGuard wants one UDP port. Neither gets through a network that blocks UDP altogether, which is where OpenVPN over TCP 443 still wins.
Where each one belongs
- IPsec: site-to-site tunnels between offices, data centres and clouds; the VPN client built into Windows, macOS, iOS and Android; networks managed by an IT team.
- WireGuard: personal VPN services, home labs and cloud servers, anything where speed, battery life and a small, auditable codebase matter more than enterprise options.
- Neither hides the fact that you are using a VPN. On networks that inspect traffic, an obfuscation layer or OpenVPN over TCP 443 is what gets through.
Security
Both are secure when deployed with modern ciphers. IPsec's risk is its option list: weak or outdated settings can be left on. WireGuard has no option list, and its small size let it be formally verified. The privacy question is the same for both: the server holds your current address while the tunnel is up, so what counts is the provider's no-logs practice. GhostShield VPN stores nothing from the tunnel, your real IP address included.
The disadvantages of WireGuard
WireGuard's simplicity cuts both ways, and it is worth knowing the limits before you pick it. It runs on UDP only, so a network that blocks UDP blocks it. It has no obfuscation: on a network that inspects traffic the handshake is recognisable, and WireGuard's own documentation lists both points as known limitations. It is a protocol, not a management platform — it has no built-in way to hand out addresses, revoke a user or bill a customer, so a VPN service has to build all of that around it. And it is not part of Windows, macOS, iOS or Android the way IPsec is, so using it always means installing an app.
Try WireGuard with GhostShield VPN
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 read WireGuard vs OpenVPN and WireGuard vs IKEv2.
Questions people ask
Is WireGuard better than IPsec?
For a personal VPN, yes: it is faster in the published measurements, far simpler to set up and audit, and it roams between networks without extra configuration. IPsec remains the standard for site-to-site links between offices and clouds and for the VPN clients built into Windows, macOS, iOS and Android, where WireGuard is not available without an app.
What is the difference between OpenVPN and IPsec?
OpenVPN is a single program that builds its tunnel over TLS, usually in user space, and can run over UDP or TCP on any port. IPsec is a set of standards built into the operating system’s network stack: ESP encrypts and authenticates each packet in the kernel and IKE (usually IKEv2) sets up the keys, over UDP ports 500 and 4500. In the WireGuard whitepaper benchmark IPsec reached 825 to 881 Mbps where OpenVPN reached 258 Mbps on the same link.
Does WireGuard use IPsec?
No. WireGuard is its own protocol with its own packet format, handshake and fixed set of ciphers (ChaCha20-Poly1305, Curve25519, BLAKE2s). It was designed as a simpler replacement for IPsec and OpenVPN, not a layer on top of them.
Is IPsec obsolete?
No. It is the backbone of site-to-site VPNs between offices, data centres and clouds, and of the VPN clients that ship with Windows, macOS, iOS and Android. What has changed is that consumer VPN services now reach for WireGuard first, because it is faster and easier to run at scale.
How secure is IPsec?
Very, when it is configured with modern ciphers such as AES-GCM and current IKEv2. Its risk is complexity: it has many options, and old or weak ones can be left enabled. WireGuard removes that risk by offering no options at all.
Which is faster, WireGuard or IPsec?
WireGuard, in the whitepaper benchmark: 1,011 Mbps and a 0.403 ms ping, against 825 Mbps (ChaCha20-Poly1305) or 881 Mbps (AES-256-GCM) and pings around 0.5 ms for IPsec on the same gigabit link. WireGuard’s site says the test is old and both have gotten faster since, with WireGuard still ahead in some cases because it spreads work over several cores.
What are the disadvantages of WireGuard?
It runs on UDP only, so a network that blocks UDP blocks it. It has no obfuscation, so its handshake is recognisable on a network that inspects traffic; WireGuard’s own documentation lists both as known limitations. It is a protocol, not a management platform: handing out addresses, revoking a user and billing are left to whatever service runs it. And it is not built into Windows, macOS, iOS or Android, so using it means installing an app.
Is WireGuard or IPsec better on a phone?
WireGuard, in practice: a phone that moves between Wi-Fi and mobile data keeps its tunnel without renegotiating, and the app handles the switch. IKEv2/IPsec is the built-in option on iPhone and Android, so it works without a VPN app when an IT team gives you a profile. GhostShield VPN uses WireGuard in its iPhone, iPad and Android apps.
Which protocol does GhostShield VPN use?
WireGuard with ChaCha20-Poly1305 in every app: Windows, Mac, iPhone, iPad, Android and Google TV.
Sources
- WireGuard whitepaper by Jason A. Donenfeld: the benchmark against two IPsec configurations and OpenVPN
- WireGuard performance page: the note that the benchmarks are old
- WireGuard known limitations: UDP only, no obfuscation
- RFC 4303, IP Encapsulating Security Payload (ESP)
- RFC 7296, Internet Key Exchange Protocol Version 2 (IKEv2)
- RFC 4555, IKEv2 Mobility and Multihoming Protocol (MOBIKE)
- Microsoft Learn: VPN connection types in Windows
- Apple Platform Deployment: VPN overview (IKEv2, IPsec and L2TP)
- Wikipedia: WireGuard