WireGuard vs OpenVPN: the difference and what to choose

If the server is new and the network lets UDP through, take WireGuard: a ten-line file, little work for the processor, a tunnel that survives a change of network. Take OpenVPN where you can't do without it: only TCP gets through, you need logins with passwords and a second factor, or the client or router understands only .ovpn. Neither hides: both are recognised from the first packets. On one server they don't get in each other's way.

Updated

Both in one list. .conf and .ovpn files go into one place: Profiles → Add.

Download Veli for free
On this page

Which one to take

  • Your own server, ordinary network

    TakeWireGuard

    WhyEasier to set up, lighter for the processor

  • A phone that moves between Wi-Fi and mobile data

    TakeWireGuard

    WhyThe next packet simply comes from the new address

  • A weak router

    TakeWireGuard

    WhyLess work per packet

  • The network passes only TCP 443

    TakeOpenVPN over TCP

    WhyWireGuard has no TCP mode

  • Logins, passwords, a second factor, certificates with a date

    TakeOpenVPN

    WhyWireGuard has only keys

  • An old router or client that understands only .ovpn

    TakeOpenVPN

    WhyAlmost everything understands it

  • A layer 2 bridge

    TakeOpenVPN with dev tap

    WhyWireGuard carries only IP

  • The network cuts VPNs

    TakeNeither

    WhyAmneziaWG or VLESS Reality

The main difference

WireGuard is a small protocol with a fixed set of ciphers. Each side has a pair of keys, the server knows devices by their public keys, and that is all: no logins, no certificates, no choice of algorithms. It works in the Linux kernel from 5.6 on, and only over UDP.

OpenVPN is a program with hundreds of settings. The connection starts with a TLS handshake, and data is encrypted with the algorithm both sides agreed on, usually AES-256-GCM. The server hands out addresses, routes and DNS, checks a certificate, a password and, through plugins, a second factor. It runs over UDP or TCP on any port.

The rest follows from that: WireGuard is easier to set up correctly, OpenVPN is easier to fit to somebody's requirements.

WireGuard and OpenVPN side by side

  • Transport

    WireGuardUDP only

    OpenVPNUDP or TCP

  • Ciphers

    WireGuardOne set: ChaCha20-Poly1305, Curve25519, BLAKE2s

    OpenVPNAgreed: AES-GCM or ChaCha20-Poly1305, TLS for the control channel

  • Login

    WireGuardA pair of keys, optionally a shared key

    OpenVPNCertificate, name and password, second factor

  • Where it runs

    WireGuardIn the Linux kernel; in a driver or a program elsewhere

    OpenVPNIn a program; with DCO the data goes in the kernel

  • Addresses

    WireGuardWritten in the file

    OpenVPNHanded out by the server

  • Routes and DNS

    WireGuardIn the client's file

    OpenVPNSent by the server

  • Change of network

    WireGuardGoes on with the next packet

    OpenVPNOver UDP it can (peer-id), over TCP it connects anew

  • Is it connected?

    WireGuardIt doesn't say: silent without traffic

    OpenVPNYes, there is a session

  • Expiry

    WireGuardNone: the key is removed from the server

    OpenVPNThe certificate has one and can be revoked

  • File

    WireGuardA ten-line .conf

    OpenVPNAn .ovpn with certificates inside

Speed and DCO

WireGuard is usually faster, above all on routers, phones and cheap VPS: there is less work per packet, and the kernel doesn't pass each one to a program and back. There are no numbers here on purpose: WireGuard's own site calls its benchmarks old and not very well conducted. Compare on your server at the same time of day.

The gap got smaller with OpenVPN 2.6: DCO moves data encryption into the kernel. On Windows the driver comes in the official installer from 2.6 on; on Linux the new ovpn module is in the kernel from 6.16 and needs OpenVPN 2.7. DCO works only with dev tun, AEAD ciphers and no compression; with other settings it switches itself off and says so in the log.

Over TCP OpenVPN is slower when packets get lost: TCP inside TCP repeats the same thing twice. It is a reserve, not the main way.

Security

  • Both are solid when the programs are recent and no old ciphers are left in.
  • WireGuard is harder to set up badly: there is nothing to choose. Its protocol has been formally verified, and the code is small.
  • OpenVPN is more flexible: a certificate can be revoked, access closed with a password and a second factor. An old cipher or compression can also be left in by accident.
  • Strangers get no answer from WireGuard without the right key, and from OpenVPN with tls-crypt either.
  • Quantum computers: WireGuard has PresharedKey for the long run; in OpenVPN it depends on the TLS library.

What the network and the site see

  • Your provider recognises both. WireGuard's handshake has fixed sizes and a type in the first byte. Researchers at USENIX Security 2022 recognised OpenVPN passively and with probes: more than 85% of flows, in the network of a provider with a million users.
  • Port 443 and TCP help OpenVPN pass a simple firewall, but don't make it look like a site.
  • Sites see the server's address in both cases.
  • The contents and the names of sites are hidden from the network in both.

Check yours

Linux server: Terminal
sudo ss -lunp | grep -E '51820|1194'
sudo wg show
openvpn --version | head -1

The first shows who listens on UDP, the second the last handshake (latest handshake), the third the OpenVPN version.

Linux: is the DCO module there
modinfo ovpn 2>/dev/null | head -3
uname -r

An empty answer to the first means there is no module, and OpenVPN works without it.

Windows: PowerShell
Get-NetAdapter | Format-Table Name, InterfaceDescription, Status

The description says whose adapter it is: WireGuard, OpenVPN Data Channel Offload, Wintun, TAP-Windows.

Sources

How we write and check

In Veli

Both in one list

.conf and .ovpn files go into one place: Profiles → Add. WireGuard connects on Windows, macOS, Linux and Android, OpenVPN only on Windows and Linux: on macOS and Android the app says so right away. Of the rules in Apps and sites, both take IP addresses; on Android, which app goes through the VPN can be chosen on any protocol.

On your own server the app installs both WireGuard and OpenVPN over SSH, one next to the other: the “Add a protocol” tile on the server screen. A device gets a QR code or an .ovpn with the keys inside.

FAQ

Which is faster, WireGuard or OpenVPN?

Usually WireGuard: less work per packet. With DCO the gap is smaller, and OpenVPN over TCP is the slowest, above all with packet loss.

Which is more secure, WireGuard or OpenVPN?

Both are secure with recent versions. WireGuard has fewer settings to get wrong, OpenVPN has more ways to manage access.

Can I convert an .ovpn to WireGuard?

No: the keys are different, and the server has to run WireGuard. Put it next to OpenVPN and move the devices over one by one.

Can I run both on one server?

Yes. The ports differ, 51820 and 1194; give the tunnel networks different ranges.

Why is OpenVPN still used?

For TCP, passwords, revoking certificates and old routers that understand nothing else.

Can WireGuard use TCP?

No, and the developers won't add it. Where only TCP gets through, take OpenVPN over TCP or VLESS.

WireGuard and OpenVPN in one list

Veli is a free client for Windows, macOS, Linux and Android: a .conf or .ovpn file opens in Profiles, and your own server is set up over SSH.