talira

WireGuard

Fast, modern, secure VPN tunnel

open sourceGPL-2.0-onlyself-hostablefree

WireGuard is a simple, fast VPN that uses state-of-the-art cryptography (Noise protocol framework, Curve25519, ChaCha20, Poly1305, BLAKE2) and aims to be faster and simpler than IPsec and more performant than OpenVPN. You add a network interface such as wg0, give it a private key and your peers' public keys, and it encapsulates IP packets over UDP, roaming between IP addresses like Mosh. Built into the Linux kernel, it also runs on Windows, macOS, BSD, iOS and Android, configured with the wg and wg-quick tools or the apps. It is a small, auditable codebase from Jason A. Donenfeld (ZX2C4 and Edge Security); key distribution is left to other layers. The kernel parts are GPLv2.

Ways to install

Problems it solves

  • set up a VPN back to my home network that is faster and simpler than OpenVPN
  • replace our IPsec site-to-site tunnel with something easier to configure and audit
  • connect two servers over the internet with an encrypted tunnel using only public keys
  • keep my VPN connected while my phone switches between Wi-Fi and mobile data
  • run a VPN on a router or small embedded device without slowing it down
  • reach my Pi-hole and home services from my phone when I'm away
  • give each container or network namespace its own encrypted tunnel
  • a VPN protocol that's small enough to review the code myself
  • build my own mesh or VPN product on a fast, well-studied tunnel protocol

Features

  • state-of-the-art cryptography: Noise protocol framework, Curve25519, ChaCha20, Poly1305, BLAKE2, SipHash24, HKDF
  • cryptokey routing: peers identified by public keys mapped to allowed tunnel IPs
  • roaming between IP addresses without reconnecting
  • in the Linux kernel for high throughput; userspace Go implementation elsewhere
  • apps for Windows, macOS, iOS and Android
  • wg and wg-quick command-line tools
  • works with network namespaces and containers
  • optional pre-shared key for an extra layer of post-quantum secrecy
  • formally verified protocol described in a technical whitepaper

Limitations

  • Doesn't tunnel over TCP: it runs over UDP only, and wrapping it in TCP is left to tools like udptunnel or udp2raw4
  • Doesn't obfuscate traffic against deep packet inspection: obfuscation is left to a layer above WireGuard4
  • Doesn't distribute keys or push configuration to clients: key distribution is out of scope5
  • Isn't post-quantum secure by default: a pre-shared key adds a layer of post-quantum secrecy4

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what WireGuard does.

  1. strongSwan Open-source, modular and portable IPsec-based VPN solution
  2. OpenVPN Open source VPN daemon
  3. Libreswan Free software implementation of the IPsec VPN protocol and the Internet Key Exchange (IKE)
  4. Algo VPN Set up a personal WireGuard and IPsec VPN in the cloud with secure defaults
  5. Tailscale Private WireGuard networks made easy
  6. NetBird Open source zero trust networking on a peer-to-peer WireGuard network

Compare WireGuard with the top 3