WireGuard vs OpenVPN: Which One Should You Use?

A photograph of a person holding a smartphone with a VPN logo.

Virtual private networks (VPNs) are vital tools for keeping your computers safe over the internet. They provide a decent level of security for your online activities and allow you to link machines across different networks. If you are planning to create your own VPN solution, here we compare two popular VPN solutions: WireGuard vs OpenVPN to help you determine the right one for you.

WireGuard vs OpenVPN: A Side by Side Comparison

CategoryWireGuardOpenVPN
AvailabilityAvailable on most desktop and mobile operating systemsAvailable on desktop and mobile as well as routers and most VPN providers
InstallationSimpler config but requires terminal know-how for client and server deploymentConfig can be tricky on the server side but easier to deploy on clients
Overall SpeedCan extract the maximum throughput out of a connectionCan be slow on bandwidth-limited connections
EncryptionComes with a single set of data encryption ciphers and hashing algorithmsCan be flexible with its data encryption ciphers
Overall SecuritySubjected to formal verifications showing its code correctnessMature and “battle tested” codebase
AuditabilityHas a small codebase making security audits easierHas a large codebase which can be a vector for potential exploits
PrivacyDoesn’t support dynamic IP addressing and can log IP addressesSupports dynamic IP addressing and can be configured to remove all logs
Best ForUsers that want a fast VPN service with a minimal VPN daemonUsers that want a reliable VPN that’s will work with routers and VPN providers

What is WireGuard

WireGuard is an innovative VPN protocol that’s both lightweight and fast. Unlike a traditional VPN solution, WireGuard offers a minimal network interface to connect computers over the internet. This makes it attractive to users that want to build their own VPN solution instead of relying on an entire software suite.

A screenshot showing the homepage for the WireGuard project.

Originally developed for the Linux kernel, WireGuard is now available on Windows, macOS, iOS, and Android. On top of that, WireGuard is completely free-of-charge, making it really easy to get started with and deploy your own VPN.

Good to know: still on the fence with using a VPN? Learn the benefits of using a VPN today.

What is OpenVPN

OpenVPN is a powerful software suite for managing VPNs. It’s available on Linux, Windows, macOS, Android, and iOS. It’s also a common protocol used by commercial VPN providers and networking hardware.

A screenshot showing the homepage for OpenVPN.

Developed in 2001, OpenVPN provides a complete VPN solution for connecting machines on a virtual network. It comes in two parts: the OpenVPN Community Edition and OpenVPN Connect. The former acts as your network’s backbone, while the latter serves as the endpoint for your clients. Lastly, OpenVPN also offers a paid SaaS solution that comes with a Web GUI for an even easier VPN management setup.

WireGuard vs OpenVPN: A Comprehensive Comparison

Although WireGuard and OpenVPN are both capable protocols, there are still a handful of differences between the two that can make or break your experience. Below, we look at some of those differences to help you decide the one that matches your needs.

Installation

One key factor when picking what VPN to use is how easy it is to deploy from scratch. Having an idea of the install process and what it requires is important if you’re connecting multiple computers in a network.

With WireGuard, the install process is the same for both client and server. This involves going into the terminal, creating the WireGuard interface, and generating a keypair for each machine. Once you have the keypair, you need to share that to your central server to start the peering process. Overall, setting up WireGuard requires familiarity with the command line which can be a problem for less technical users.

A terminal showing a running WireGuard VPN consisting of two nodes.

In contrast, OpenVPN has a different install process for its server daemon and its client endpoint. While getting the server up and running still requires technical know-how, setting up the client endpoint does not. This makes it easier to deploy OpenVPN for multiple users across different operating systems.

A screenshot showing OpenVPN running on an Android device.

Winner: OpenVPN

On a side note: learn how to create your own VPN service with Tailscale.

Connection Speed

Another key consideration when picking a VPN is its overall throughput. Using a slow VPN can be a huge bottleneck to your daily activities especially when transferring files and connecting to other machines.

WireGuard’s biggest strength is its ability to extract the maximum throughput from a connection. During my tests, WireGuard was able to use my entire network’s bandwidth (500 Mbit/s) with little to no loss.

A terminal showing the iperf3 results between two WireGuard nodes.

Meanwhile, overall throughput is OpenVPN’s weakest point. While testing with a self-hosted setup, OpenVPN only managed to get around 6.8% (34 Mbit/s) of the total available bandwidth for my connection (500 Mbit/s).

A terminal showing the iperf3 results between two OpenVPN nodes.

Winner: WireGuard

Encryption

Encryption is a core part of every VPN service. It guarantees that data transfer between two hosts is unreadable by outside actors. In this regard, both WireGuard and OpenVPN come with reasonably strong encryption algorithms right out of the box.

WireGuard implements its own strict encryption layer centered around the ChaCha20-Poly1305 cryptographic algorithm. On top of that, it uses Curve25519 for establishing peer agreement, along with two hash functions: SipHash24 and BLAKE2s for deriving keys.

A terminal showing the private key generation process using WireGuard's hashing algorithms.

One downside of this strict approach is that WireGuard doesn’t have “cipher and protocol agility.” Any vulnerabilities with ChaCha20-Poly1305, Curve25519, SipHash24, and BLAKE2s would require all WireGuard nodes to download a new version with a different algorithm.

OpenVPN relies on OpenSSL for its cryptographic functions allowing it to offer a variety of options for your VPN’s data encryption cipher. That said, OpenVPN sets its data encryption cipher to AES-256-CBC and relies on TLS for client authentication.

A terminal showing the default data encryption cipher for OpenVPN.

Another benefit of OpenVPN’s reliance on OpenSSL is that changing its encryption algorithm is significantly easier compared to WireGuard. For that, you only need to reconfigure your OpenVPN server with the new cipher and update the config on your client machines.

Winner: OpenVPN

Security

In terms of overall security, both WireGuard and OpenVPN are reasonably secure. Despite being new, the WireGuard protocol has been subjected to numerous formal verifications. These found the protocol to possess code correctness, message and forward secrecy, and resistance to various kinds of key and message attacks.

A screenshot showing the webpage for WireGuard's formal verification papers.

On the other hand, OpenVPN has been audited for potential security issues and served as the de facto VPN standard for more than 20 years. OpenVPN has also been extensively tested to perform well on different kinds of environments including enterprise-grade workloads.

Winner: Tie

Auditability

Aside from encryption and security, code complexity is also a key factor when picking a VPN protocol. Larger, more complex programs can be hard to audit, which makes them susceptible to security issues.

One of WireGuard’s main priorities is to provide a simple alternative to established VPN solutions such as IPsec and OpenVPN. This focus on code simplicity enabled WireGuard developers to develop the program while maintaining a small codebase. For instance, the Go implementation for WireGuard has less than 15,000 lines of code.

A terminal showing the overall amount of code present in WireGuard's Go implementation.

OpenVPN is a mature and complex software project with decades of development history behind its back. Currently, it’s sitting at just over 100,000 lines of code, making it one of the largest VPN daemons. While this codebase is “battle-tested,” its large attack surface makes it difficult to maintain and look for potential vulnerabilities and exploits.

A terminal showing the overall amount of code present in the OpenVPN Git repository.

Winner: WireGuard

Privacy

One of the weaknesses of WireGuard is how it handles IP address assignments. This is because, by design, the protocol doesn’t support dynamic IP addressing. Instead, it opts for a static internal IP address for every machine making it easy for WireGuard servers to track your activities.

A terminal showing an example WireGuard config with a static address.

Unlike WireGuard, OpenVPN assigns a random IP address whenever you connect to its server. This makes it harder for the VPN provider to track your activities inside the network, which is helpful if you’re on a commercial VPN service. Lastly, OpenVPN also supports a “zero log” config for self-hosted setups, making it safer for privacy-conscious users.

Winner: OpenVPN

WireGuard vs OpenVPN: Which to Choose?

In the end, picking the right VPN daemon and protocol will depend on what you want out of your VPN service:

  • If you’re looking for a fast and minimalist VPN protocol, WireGuard is the clear choice. Its focus on simplicity and performance makes WireGuard great for users who want the best “power to weight” ratio for their VPN server.
  • If you’re looking for a stable and reliable VPN protocol, OpenVPN is a great pick. With its mature codebase and focus on privacy, OpenVPN takes the cake if you want a VPN that works across all workloads.

Exploring the differences between WireGuard vs OpenVPN is the first step in understanding the benefits of using VPNs. Learn more about this wonderful technology by looking at some of the best security-focused VPN providers today.

Image credit: Privecstasy via Unsplash and Wikimedia Commons. All alterations and screenshots by Ramces Red.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Ramces Red
Ramces Red - Staff Writer

Ramces is a technology writer that lived with computers all his life. A prolific reader and a student of Anthropology, he is an eccentric character that writes articles about Linux and anything *nix.