← Knowledge Base
VPNReference note1 min read · updated 2026-11-27

WireGuard: the tunnel is up but nothing works

A checklist: handshake, keys, AllowedIPs, firewall, forwarding and MTU.

wireguardtroubleshootingvpn
  1. sudo wg show: is there a latest handshake? No handshake means the packets do not arrive: check the endpoint name and port, the UDP firewall rule (cloud and VM) and that the public keys are exchanged correctly (each side has the other's public key).
  2. Handshake yes but no traffic: check AllowedIPs (they are both the routing table and the access list for each peer) and that the peer addresses do not overlap with your LAN.
  3. To use the server as a gateway: sysctl net.ipv4.ip_forward=1 and a NAT rule (iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE).
  4. Large pages stall but small ones work: lower the MTU (MTU = 1380 in [Interface]).
  5. Behind NAT: PersistentKeepalive = 25 keeps the mapping alive.