What is WireGuard?

WireGuard is a VPN protocol built into Linux, with apps for Windows, macOS, Android and iOS. Every device has a key pair: it keeps its private key and shares its public key with the devices it connects to. A config file has an [Interface] section with the device's own private key and VPN address, and a [Peer] section for each device on the other end.

Tool description

Fill in the form, and the tool writes a config for your server and one for each client, with new key pairs. Under Server Configuration, enter the Server endpoint: your server's public IP address or domain name with the port, like 203.0.113.10:51820. It goes into the client configs exactly as typed, so include the port. The other fields start filled in, with Server name wg-server, Server port 51820 and Server IP address 10.0.0.1/24. Server MTU, PostUp and PostDown are optional.

Under Clients, set each client's Client name, Client IP address, Allowed IPs, DNS servers, Client MTU and Persistent keepalive (seconds). Add New Client adds one with the next free address. Each config has a download button, and the client configs also have a QR code button for the WireGuard phone app.

Features

  • X25519 key pairs made in your browser with the TweetNaCl library
  • A server config with a [Peer] for every client, plus one config per client
  • Downloads as .conf files, and QR codes for phones

Example

With one client and the endpoint above, the client config looks like this, with real keys in place of the capital words:

# client1 configuration
[Interface]
PrivateKey = CLIENT1_PRIVATE_KEY
Address = 10.0.0.2/32
DNS = 1.1.1.1, 1.0.0.1

[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = 203.0.113.10:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
INI

The default Allowed IPs, 0.0.0.0/0, ::/0, send all of the client's traffic through the VPN, and the default DNS servers are Cloudflare's. In the server config, each client gets a [Peer] with its Client IP address as AllowedIPs.

Good to know

  • The keys are made in your browser and aren't sent anywhere, but nothing is saved either. Reloading the page makes new keys, so download all the configs first.
  • New clients always get an address in 10.0.0.x. If you change the Server IP address, change each Client IP address to match.
  • The server config has SaveConfig = true, so wg-quick writes the running settings to the file when the interface stops, and edits made to the file while it runs are lost.
  • For clients to reach the internet through the server, turn on IP forwarding on the server and add NAT rules, usually in PostUp and PostDown.