Skip to content

WireGuard site-to-site between two Proxmox hosts

Draft example post. Shows long-form formatting, tables and annotated config blocks. It is hidden in production builds while draft is true.

published
reading time
1 min

Topology

SiteLANTunnel addressPublic endpoint
A10.10.0.0/2410.99.0.1/30a.example.net:51820
B10.20.0.0/2410.99.0.2/30b.example.net:51820

Interface on site A

/etc/wireguard/wg0.conf
[Interface]
Address    = 10.99.0.1/30
ListenPort = 51820
PrivateKey = <site-a-private-key>
PostUp     = sysctl -w net.ipv4.ip_forward=1
 
[Peer]
PublicKey           = <site-b-public-key>
AllowedIPs          = 10.99.0.2/32, 10.20.0.0/24
Endpoint            = b.example.net:51820
PersistentKeepalive = 25

AllowedIPs does double duty: it is both the routing table entry and the source filter for incoming packets.

Bring it up

systemctl enable --now wg-quick@wg0
wg show wg0 latest-handshakes

warning

If the handshake never completes, check that UDP 51820 is forwarded on both edges before touching keys.

WireGuard site-to-site between two Proxmox hosts · Rafli Anggoro