Network security

What Is a VPN Protocol? WireGuard, OpenVPN & IKEv2 Explained

Your VPN app's protocol setting decides how fast, how stable, and how hard to block your connection is. Here is what each option actually does.

Cysoro Security TeamPublished · 8 min read
NETWORK SECURITY What is a VPN protocol? WireGuard, OpenVPN, and IKEv2 explained. Your device Tunnel VPN server WireGuard · OpenVPN · IKEv2 cysoro.com
Quick answer

A VPN protocol is the set of rules your device and a VPN server follow to build an encrypted tunnel between them. It decides how the two sides prove who they are, agree on encryption keys, and wrap your traffic so nobody in between can read it. The main protocols today are WireGuard, OpenVPN, and IKEv2/IPsec, with older PPTP and L2TP now considered insecure or outdated.

Key takeaways

  • A VPN protocol builds the encrypted tunnel: it handles authentication, key exchange, encryption, and transport.
  • WireGuard is the best default for most people in 2026, OpenVPN is the best fallback on restrictive networks, and IKEv2 is best for built-in mobile clients.
  • PPTP is broken and should never be used; L2TP has no encryption of its own and only works inside IPsec.

Open any VPN app's settings and you will find a protocol option: WireGuard, OpenVPN, IKEv2, sometimes more. Most people leave it on automatic and never think about it again, but that one setting decides how fast your connection is, how stable it stays on a phone, and whether a hotel Wi-Fi network can block it.

What is a VPN protocol?

A VPN protocol is the set of rules your device and the VPN server follow to build an encrypted tunnel between them. It decides how the two sides prove who they are, how they agree on encryption keys, which ciphers protect your data, and how packets are wrapped and sent.

Think of it this way: a VPN is the private road, and the protocol is the engineering standard that road is built to. Different standards trade speed, simplicity, and compatibility in different ways.

Strictly speaking, what most apps call a protocol is a combination of several standardized protocols working together. WireGuard, OpenVPN, and IKEv2/IPsec each bundle authentication, key exchange, encryption, and transport into one package you can select with a single tap.

The protocol does not decide what your VPN provider logs, where its servers are, or whether it is trustworthy. It only decides how the tunnel works. Both halves matter, and a strong protocol cannot fix a provider that keeps detailed logs.

How does a VPN protocol work?

Every VPN protocol follows the same four steps, even though the details differ. Understanding them makes the differences between protocols much easier to follow.

How a VPN protocol builds a tunnel 1 Handshake device and server prove who they are 2 Key exchange both sides agree on secret session keys 3 Tunnel opens traffic is wrapped in encryption 4 Traffic flows keys rotate, the tunnel stays up If any step fails, the tunnel never opens — that is the point.
The four steps every VPN protocol follows to build a tunnel. Illustration by Cysoro.

First comes the handshake, where the two sides prove their identity using certificates, pre-shared keys, or public keys. Then comes the key exchange, where they agree on secret keys without sending those keys across the network in the open.

Next the tunnel opens: every packet is encrypted with the session keys and wrapped for transport. Finally, the protocol maintains the tunnel, rotating keys over time and reconnecting when your network changes.

Protocols differ mainly in how they do the handshake and key exchange, which ciphers they allow, and whether they run over UDP or TCP. Those choices decide speed, reliability, and how easy the tunnel is to spot and block.

What is WireGuard?

WireGuard is a modern, streamlined VPN protocol designed for speed, security, and simplicity. It was created by Jason Donenfeld, merged into the Linux kernel in version 5.6 in 2020, and is now the default in most VPN apps.

Its design is deliberately opinionated. WireGuard uses one fixed set of modern cryptography: Curve25519 for key exchange, ChaCha20-Poly1305 for encryption, and BLAKE2s for hashing, with a Noise-based handshake completed in a single round trip, as described in the WireGuard whitepaper.

The Linux implementation is under 4,000 lines of code, according to the WireGuard whitepaper, which makes it far easier to audit than IPsec or OpenVPN. It has no menu of cipher options, so there is nothing to misconfigure.

WireGuard identifies each peer strictly by its public key and ties that key to a list of allowed IP addresses, a design called cryptokey routing. It runs only over UDP, reconnects almost instantly when you switch networks, and is the fastest option for most people.

Its main weakness is privacy plumbing: because each peer has a fixed IP address, VPN providers must add their own workarounds to avoid tying a user to one address. That is the provider's job, not yours, but it is worth knowing the protocol itself does not solve it.

What is OpenVPN?

OpenVPN is the mature, open-source VPN protocol that has been the industry standard since the early 2000s. It builds its security on TLS, the same family of protocols that protects HTTPS, and usually uses OpenSSL for its cryptography.

OpenVPN runs in user space, supports certificates and username-and-password authentication, and can use UDP or TCP as its outer transport. Over TCP on port 443, its traffic looks much like ordinary HTTPS traffic to a simple firewall, which is why it is often the fallback on hotel, school, or office networks that block other VPNs.

That flexibility is both its strength and its cost. OpenVPN supports many ciphers and configuration options, and its codebase is far larger than WireGuard's, which means more to audit and more to misconfigure. It is also usually slower than WireGuard, especially over TCP.

OpenVPN remains the right choice when you need certificate-based deployments, a TCP fallback, or compatibility with older routers and servers that only speak OpenVPN. Our guide to securing your Wi-Fi covers the network side of the same problem.

What is IKEv2/IPsec?

IKEv2/IPsec is the standards-based option. IPsec is the IETF suite of standards that encrypts traffic at the network layer, and IKEv2, defined in RFC 7296, is the part that authenticates the two sides and sets up the security associations that IPsec uses.

RFC 7296 describes IKE as the component of IPsec used for mutual authentication and for establishing and maintaining security associations. The actual packet protection is done by IPsec's Encapsulating Security Payload, or ESP.

IKEv2 is built into Windows, macOS, iOS, and Android, so it works without a third-party app or driver. It also handles network changes well: when your phone moves from Wi-Fi to mobile data, IKEv2 re-establishes the tunnel quickly, which is why it is popular for mobile devices.

Its downside is complexity. The IPsec suite and its policy configuration are harder to set up correctly than WireGuard's peer model, and it uses UDP ports 500 and 4500, which some networks block. NIST's guide to IPsec VPNs, SP 800-77 Rev. 1, covers how organizations should configure it.

WireGuard vs OpenVPN vs IKEv2: which should you use?

There is no universal winner, but there is a clear default. Use WireGuard unless you have a specific reason not to, and switch only when a network or device forces your hand.

WireGuardOpenVPNIKEv2/IPsec
Designed2016, in Linux kernel 5.6 (2020)Early 2000sIKEv2 standardized in RFC 7296 (2014)
EncryptionChaCha20-Poly1305, fixedAES-256 typically, configurableAES-256 typically, via IPsec
HandshakeNoise, one round tripTLS sessionIKE_SA_INIT plus IKE_AUTH
TransportUDP onlyUDP or TCPUDP 500/4500, plus ESP
SpeedFastest in most testsGood over UDP, slower over TCPVery good
Mobile roamingExcellentGoodExcellent
Built into operating systemsLinux kernel; apps elsewhereNeeds an appBuilt into Windows, macOS, iOS, Android
Getting through firewallsLimited obfuscationBest, over TCP port 443Limited
Code sizeUnder 4,000 linesLarge, plus OpenSSLLarge, standards suite
Open sourceYesYesStandards-based, many implementations

Choose WireGuard when you control both ends or use a modern VPN app. Choose OpenVPN when a strict network blocks everything else. Choose IKEv2 when you need a built-in client with no extra app, such as a managed work phone. You can check whether your tunnel is actually hiding your address with our what is my IP tool.

Run a leak test after switching protocols too, using our WebRTC leak test to confirm your real address is not slipping out beside the tunnel.

What about PPTP, L2TP, and SSTP?

Older protocols still appear in router menus and old guides, but most of them should not be used anymore. Knowing which is which saves you from picking a broken option by accident.

PPTP is broken. Its encryption has been defeated for years, and it should never be used for anything sensitive. If a device only offers PPTP, replace the device or the VPN setup.

L2TP has no encryption of its own. It is a tunneling protocol that must run inside IPsec to be secure. L2TP/IPsec was once common on phones, but it is slower and harder to configure than IKEv2/IPsec, and most providers have dropped it.

SSTP is a Microsoft protocol that tunnels over HTTPS, which helps it pass through firewalls. It is Windows-focused, proprietary in origin, and rarely the best choice when WireGuard or OpenVPN is available.

Some providers also sell their own protocols, such as NordLynx, Lightway, or Hydra. These are usually WireGuard or OpenVPN with custom changes, such as double NAT for privacy or extra obfuscation. Judge them by independent audits and by whether the provider explains what it changed, not by the brand name.

What is post-quantum protection in VPN protocols?

Quantum computers could one day break the public-key cryptography that VPN handshakes rely on. NIST published the ML-KEM post-quantum key exchange standard in August 2024, and VPN providers have begun adding it to their protocols.

In practice, this means newer WireGuard-based apps may combine a classical key exchange with a post-quantum one, so that breaking either one alone is not enough. The protection matters most for traffic that an attacker could record today and decrypt later.

For most people this is not a reason to switch providers today, but it is a reason to prefer a provider that has published a clear post-quantum plan and had its implementation audited. If a provider claims post-quantum protection with no details, treat the claim with skepticism.

How do you choose a VPN protocol in your app?

Leave the app on automatic in most cases. Modern apps pick WireGuard by default and fall back to another protocol when the network demands it, which is the right behavior for most users.

Change the setting only for a reason. If your VPN will not connect on a hotel or office network, try OpenVPN over TCP port 443, or the app's anti-blocking mode. If you are setting up a device with no VPN app, such as a router or a managed phone, use IKEv2 or a configuration file.

After changing protocols, test the connection. Check that your IP address changed, run a leak test, and confirm the speed is acceptable. A protocol that connects but leaks your real address is worse than no VPN at all, because it gives you false confidence.

Which protocol should you pick? Do you have a modern VPN app? Yes — use WireGuard or leave it on automatic No app on the device use IKEv2 or a config file Network blocks your VPN? try OpenVPN over TCP 443 On a phone, switching networks? WireGuard or IKEv2 both cope well
A simple decision guide for picking a VPN protocol. Illustration by Cysoro.

Also remember that the protocol is only one layer. Use a kill switch so traffic stops if the tunnel drops, keep your app updated, and check your DNS settings so queries do not leak outside the tunnel. You can verify your DNS setup with our DNS lookup tool.

The bottom line

A VPN protocol is the rulebook that builds your encrypted tunnel. WireGuard is the best default for most people in 2026, OpenVPN is the best fallback on restrictive networks, and IKEv2 is the best choice for built-in clients.

Leave your app on automatic, switch only for a reason, and never use PPTP. The protocol matters, but the provider you trust with your traffic matters more.

Frequently asked questions

What is a VPN protocol in simple terms?

It is the set of rules that builds the encrypted tunnel between your device and the VPN server. It covers how the two sides prove their identity, agree on secret keys, encrypt your traffic, and send it across the internet.

Which VPN protocol is best?

WireGuard is the best default for most people: it is fast, simple, and uses modern cryptography. OpenVPN is better on networks that block other VPNs, and IKEv2 is best when you need a built-in client on a phone or laptop with no extra app.

Is WireGuard better than OpenVPN?

For speed and simplicity, yes. WireGuard's Linux code is under 4,000 lines, uses one fixed set of modern ciphers, and reconnects instantly. OpenVPN is more flexible and can run over TCP port 443, which helps it get through strict firewalls.

What is IKEv2/IPsec?

IKEv2 is the key exchange protocol that sets up IPsec security associations, as defined in RFC 7296. IPsec then encrypts the traffic. It is built into Windows, macOS, iOS, and Android, and it handles switching between Wi-Fi and mobile data well.

Is PPTP safe to use?

No. PPTP's encryption has been broken for years and should never be used for anything sensitive. If your VPN app or router only offers PPTP, switch to WireGuard, OpenVPN, or IKEv2.

Does a VPN protocol affect speed?

Yes. WireGuard is usually fastest because of its small code and efficient design. OpenVPN over TCP is usually slowest, since TCP checks that every packet arrives. The difference is small on a fast connection and larger on a slow one.

Can I change my VPN protocol?

Yes, in most VPN apps under settings. Leave it on automatic unless you have a reason to change it, such as a network that blocks your VPN or a device with no app installed.

What is the difference between a VPN protocol and a VPN service?

The protocol is the technology that builds the tunnel, such as WireGuard or OpenVPN. The service is the company that runs the servers, handles your account, and decides what it logs. A good protocol does not fix a bad provider.

Sources

  1. WireGuard — WireGuard: Next Generation Kernel Network Tunnel
  2. IETF — RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)
  3. NIST — SP 800-77 Rev. 1, Guide to IPsec VPNs
  4. OpenVPN — OpenVPN Manual
  5. Surfshark — VPN protocols: How to choose the right one in 2026
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the WireGuard whitepaper, RFC 7296 for IKEv2, NIST SP 800-77 Rev. 1, and OpenVPN's own documentation.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free