WireGuard VPN Handshake Timeout — Peer Connection Failure and No Traffic
Errornetwork
Overview
Fix WireGuard VPN handshake timeouts where peers cannot establish a connection, showing no recent handshake or transfer in wg show output.
Key Details
- WireGuard uses a cryptokey routing model where each peer has a public key and allowed IPs
- A successful handshake should appear within seconds of initiating a connection
- wg show displays handshake time and transfer stats — no handshake means the connection failed
- WireGuard uses UDP (default port 51820) which must be allowed through all firewalls
- Unlike OpenVPN, WireGuard does not negotiate — both sides must have matching configurations
Common Causes
- Firewall blocking UDP port 51820 (or custom port) on the server or client side
- Incorrect peer public key — even one character wrong prevents handshake
- Endpoint address incorrect or DNS not resolving the server hostname
- AllowedIPs configuration mismatch preventing traffic from being routed through the tunnel
Steps
- 1Check WireGuard status: 'sudo wg show' — look for 'latest handshake' and 'transfer' values
- 2Verify the server firewall allows UDP on the WireGuard port: ufw allow 51820/udp
- 3Confirm peer public keys match: the server's peer section must have the client's public key and vice versa
- 4Test UDP connectivity: 'nc -zuv server-ip 51820' to verify the port is reachable
- 5Check AllowedIPs: server should have client's tunnel IP, client should have 0.0.0.0/0 for full tunnel
Tags
wireguardvpnhandshaketimeouttunnel
Related Items
More in Network
windows-651-pppoe-connection-failedWindows Error 651 — PPPoE Connection Failed
Warningwindows-691-authentication-failedWindows Error 691 — Authentication Failed
Warningwindows-720-ppp-connection-failedWindows Error 720 — PPP Connection Failed
Errorwindows-800-vpn-tunnel-failedWindows Error 800 — VPN Tunnel Failed
Warningwindows-network-error-619Windows VPN Error 619 — Connection Could Not Be Established
Warningwindows-network-error-868Windows VPN Error 868 — Remote Server Not Resolved
WarningFrequently Asked Questions
Run 'sudo wg show'. A successful connection shows 'latest handshake: X seconds/minutes ago' and non-zero transfer values. No handshake or handshake older than 2 minutes indicates a connection problem.