WireGuard
WireGuard VPNBest for: Personal and small team VPNs
- Hello, from Your phone
- Reply, from VPN server
- Data, from Your phone, locked
- Data, from VPN server, locked
Compare protocols
Best for: Personal and small team VPNs
Best for: Linking offices and company VPNs
WireGuard is a small, modern VPN with one fixed set of ciphers, one UDP port and public keys like SSH. IPsec is the older standard built into most routers, firewalls and phones, with many cipher choices and login options. WireGuard is simpler and usually faster to set up. IPsec fits best when you need standard support across vendors or username logins.
Tick everything that is true for you.
Your pick shows here
Tick one or more lines and we weigh them for you.
| What differs | WireGuard | IPsec |
|---|---|---|
| Code size | About 4,000 lines | Much larger, spread over IKE and ESP |
| Ciphers | Fixed: Curve25519, ChaCha20-Poly1305, BLAKE2s | Many, agreed during setup (AES-GCM is common) |
| Ports | One UDP port, often 51820 | UDP 500 and 4500, plus ESP (IP protocol 50) |
| Login | Public keys only | Certificates, shared key or username and password (EAP) |
| Handshake | One round trip | IKEv2: two exchanges to start |
| Changing network | Keeps working when your IP changes | Works with MOBIKE support |
| Built in | Linux kernel since 5.6; apps for other systems | Most operating systems, routers and firewalls |
| Standard | Published paper, not an IETF RFC | RFC 4301, RFC 4303 (ESP), RFC 7296 (IKEv2) |
Each page plays the real packets on a map, step by step, with every header explained.
Each line describes one of the two. Which one?
Question 1 of 8
Code size
About 4,000 lines
Both are secure when set up well. WireGuard is easier to keep safe because it has fewer settings and a small, reviewed codebase. IPsec can be just as strong, but a weak cipher choice is possible.
Often a little, especially on devices without AES hardware. On servers with AES acceleration, well-tuned IPsec can match it.
Yes. It uses plain UDP, so it passes through home routers. A keepalive setting keeps the NAT mapping open when the tunnel is idle.
Any UDP port you choose. 51820 is the common default.