Skip to main content

Client

Configure WireGuard client

Set temporary permission for new files:

umask 077

Create the keys:

wg genkey > /etc/wireguard/privkey
wg pubkey < /etc/wireguard/privkey > /etc/wireguard/pubkey
wg genpsk > /etc/wireguard/psk

Create the config file:

nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.10.10.2/32
PrivateKey = ...

[Peer]
Endpoint = X.X.X.X:51820
AllowedIPs = 10.10.10.0/24
PublicKey = ...
PreSharedKey = ...
PersistentKeepalive = 20