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
| Site | LAN | Tunnel address | Public endpoint |
|---|---|---|---|
| A | 10.10.0.0/24 | 10.99.0.1/30 | a.example.net:51820 |
| B | 10.20.0.0/24 | 10.99.0.2/30 | b.example.net:51820 |
Interface on site A
[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 = 25AllowedIPs 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-handshakeswarning
If the handshake never completes, check that UDP 51820 is forwarded on both edges before touching keys.