On this page
What the error looks like
In the Windows app's log it reads Handshake for peer 1 (203.0.113.5:51820) did not complete after 5 seconds, retrying (try 2); clients built on wireguard-go write Handshake did not complete after 5 seconds, retrying after the peer's key. On Linux the kernel module writes such lines only with debugging turned on, so there you usually just see that wg show has no latest handshake line.
Meanwhile the app may even show the tunnel as active: WireGuard has no connection in the usual sense, so the tunnel comes up on the device whether the server answers or not. The sure sign is the counters: data is sent, almost nothing is received.
What you see, why, and what to do
Nothing from the client arrives at the server in
tcpdumpCauseA wrong address or port in Endpoint, or the network doesn't pass UDP
What to doCheck Endpoint; try mobile data or another network
Nothing arrives, though the address is right and other networks work
CauseThe network blocks plain WireGuard: its handshake is recognized by the first packets
What to doAmneziaWG, or a TCP protocol such as VLESS Reality
Nothing arrives, the server's port is right
CauseThe server's firewall or the hosting panel's firewall closes the UDP port
What to doOpen the port over UDP:
ufw allow 51820/udp, and the same in the panelPackets arrive at the server, it doesn't answer
CauseThe client's public key isn't among the server's peers, or the client has the wrong server key
What to doCompare the keys in both files' [Peer] sections
The tunnel won't start, or the handshake goes to an old address
CauseEndpoint is a name that doesn't resolve, or resolved to an old IP
What to doCheck the name with
nslookup; put the IP into Endpoint or restart the tunnelAmneziaWG: packets arrive, no answer
Cause
S1,S2orH1–H4differ from the server's, or the client is plain WireGuardWhat to doCopy the AmneziaWG lines from the server's file as they are
The handshake happens, then breaks again and again
CauseThe same key on two devices
What to doGive each device its own key and its own [Peer] on the server
The handshake is there, but no internet
CauseNot the handshake: forwarding, NAT or AllowedIPs on the server
What to doTurn on
net.ipv4.ip_forward, check the NAT rule and the peer's AllowedIPs
Check from the client
With the tunnel on, wg show tells you whether the server has ever answered.
sudo wg showUnder the peer there should be latest handshake: … seconds ago. No such line — the server has never answered; transfer: with 0 B received confirms it. For AmneziaWG the same command is sudo awg show.
sudo wg show wg0 latest-handshakesOne line per peer: its key and the time of the last handshake in Unix seconds. 0 means there has never been one.
& "C:\Program Files\WireGuard\wg.exe" showThe WireGuard app for Windows ships wg.exe; the output is the same as on Linux.
- Endpoint by name —
nslookup vpn.example.commust return the server's address. WireGuard looks the name up once, when the tunnel starts: if the server's IP has changed since, restart the tunnel. - Another network — turn the tunnel on over mobile data or another Wi-Fi. If the handshake happens there, the server is fine and the first network doesn't let WireGuard through.
Check on the server
On the server you can see whether the client's packets arrive at all. That splits the problem in two: the way to the server, or the server itself.
sudo tcpdump -ni any udp port 51820Turn the tunnel on on the client and watch. Lines with the client's address — the packets arrive. None — they don't reach the server. Ctrl+C stops it; put your own port in place of 51820.
sudo wg showThe server's public key is under interface, the peers below it. The client's public key must be among them.
echo "CLIENT_PRIVATE_KEY" | wg pubkeyDerives the public key from the PrivateKey in the client's file. The result must be the PublicKey of one of the server's [Peer] sections.
ss -uln | grep 51820Whether anything listens on the UDP port. Nothing — the interface is down: sudo wg-quick up wg0. With ufw on, sudo ufw status must show 51820/udp as ALLOW.
- Packets arrive, nothing goes back — the keys. WireGuard silently drops packets it can't verify, so wrong keys look like a dead server.
- Packets don't arrive — the way to the server: a wrong Endpoint, a closed firewall (on the server or in the hosting panel), or a network that doesn't let UDP or WireGuard through.
AmneziaWG: the parameters must match
AmneziaWG is WireGuard with changed packets, and the server recognizes them only by its own rules. S1, S2 and H1–H4 must be the same on the client and the server, and so must S3 and S4 where the file has them (AmneziaWG 2.0): S1 and S2 are the random bytes added to the handshake packets, S3 and S4 the same for the other packets, H1–H4 the markers in place of WireGuard's packet headers. If one of them differs, the server sees noise and stays silent, which gives the same Handshake did not complete. Jc, Jmin and Jmax, the junk packets before the handshake, may differ.
Hence two typical mistakes: an AmneziaWG file opened in plain WireGuard (the app refuses the unknown lines, and with them deleted the server doesn't take its packets), and a client with S1, S2 or H1–H4 set against a plain WireGuard server. Only junk packets, Jc, Jmin and Jmax with no other AmneziaWG lines, work against a plain WireGuard server: it simply ignores them.
When plain WireGuard is blocked
If the handshake never happens on one network but works on another, that network recognizes WireGuard: its first packets have a fixed size and a fixed header and are easy to spot. Changing the port doesn't help for long. AmneziaWG helps, since it changes exactly those signs, or a protocol that looks like ordinary HTTPS from outside, such as VLESS Reality over TCP. Where filtering is serious, AmneziaWG gets found over time too, so keep a profile over TCP at hand.