Troubleshooting

WireGuard Handshake Complete With Zero Traffic? Fixing AllowedIPs, MTU Clamping, and Asymmetric NAT

The Back Room Tech Staff · Edited by Aseem Kishore
8 min read

The Back Room Tech is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

A WireGuard handshake only proves the cryptographic layer works. Routing, forwarding, fragmentation and NAT all sit above it. If wg show reports a recent handshake while traffic stays at zero or moves in only one direction, four causes come up most often: disabled IP forwarding, an MTU blackhole, conflicting AllowedIPs, or a NAT mapping that expires behind carrier-grade NAT (CGNAT). Firewall policy, missing return routes, reverse-path filtering, and wrong peer keys or endpoints can produce the same symptom, so rule those out too if the four fixes below don’t help.

Prerequisites

  • A Linux WireGuard server or router using wg-quick, with root or sudo over SSH (commands assume an in-tree WireGuard kernel, Linux 5.6 or later, and wireguard-tools 1.0.x)
  • wireguard-tools, iproute2, and iptables or nftables installed
  • Clients running the official WireGuard apps, available for common desktop and mobile platforms (wireguard.com)

Quick Reference: WireGuard Handshake but No Traffic

SymptomLikely CauseFix
Client sends bytes, server receives them, nothing beyond the servernet.ipv4.ip_forward=0 or no masqueradeEnable forwarding and add NAT
Ping works, HTTPS and SSH hangMTU/MSS blackholeLower MTU, clamp TCP MSS
Required key not availableNo peer’s AllowedIPs matches the destinationFix AllowedIPs
Tunnel dies after idle timeCGNAT mapping timeoutPersistentKeepalive = 25

Quick Diagnosis

Start with the counters. They tell you which direction is failing.

sudo wg show wg0
peer: ABC...=
  endpoint: 203.0.113.10:51820
  allowed ips: 10.8.0.2/32
  latest handshake: 14 seconds ago
  transfer: 9.42 KiB received, 0 B sent

These counters are per peer and only count encrypted WireGuard traffic. Bytes received with 0 B sent means the server is decrypting the client’s packets but sending nothing back to that peer, so the loss is somewhere after decryption: forwarding, NAT, firewall policy, a missing return route, or AllowedIPs. Then check where the kernel routes a destination:

ip route get 192.168.1.50
# On the host sending into the tunnel, addresses you expect to cross it should show "dev wg0".
# This confirms the route only, not firewall acceptance or a return route on the far side.

Common Issues and Solutions

Problem: IP Forwarding Disabled

Symptoms:

  • The tunnel IP of the server responds, but LAN hosts and the internet don’t
  • Receive counter climbs, send counter stays near zero

Why it happens: Linux drops packets between interfaces unless net.ipv4.ip_forward is 1. If the LAN has no route back to the WireGuard client subnet, replies follow the LAN’s default route and never return to the tunnel. That’s the asymmetric return path in the title. Masquerading on the server fixes it; so does adding a static route for the tunnel subnet on the LAN router.

Fix:

sudo sysctl -w net.ipv4.ip_forward=1
echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-wireguard.conf
# -w applies now; the sysctl.d file persists across reboots

Add NAT in /etc/wireguard/wg0.conf under [Interface] (replace eth0 with your WAN interface). This is a minimal starting point for a default-drop iptables firewall, not a complete policy.

On a default-drop system you also need to allow established/related return traffic explicitly, which the rule below adds:

# /etc/wireguard/wg0.conf
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

If the server also bridges to a separate LAN interface (for example eth1), add a matching forward-accept rule for -i wg0 -o eth1, and masquerade that interface too if the LAN itself sits behind NAT. Put that rule alongside the one above, in the same PostUp/PostDown lines.

This example covers IPv4 only on a default-drop iptables setup. For nftables or firewalld, build the equivalent forward-accept, established/related, and masquerade rules in that tool’s syntax; for IPv6, add parallel ip6tables rules or leave IPv6 out of AllowedIPs until you do.

Verify: sysctl net.ipv4.ip_forward returns net.ipv4.ip_forward = 1, and the send counter in wg show starts climbing.

Terminal showing sysctl net.ipv4.ip_forward = 1 followed by wg show with non-zero sent and received counters

Problem: MTU/MSS Blackhole

Symptoms:

  • ICMP ping works, but web pages stall and scp freezes mid-transfer
  • Small DNS queries succeed, large responses don’t

Why it happens: wg-quick typically calculates an MTU around 1420 based on a 1500-byte underlay, though the exact value can vary, or be overridden, depending on the interface and environment.

PPPoE drops the underlay to 1492, so full-size packets get dropped silently when ICMP “fragmentation needed” messages are filtered.

Fix: Test the path first. For IPv4 ICMP, a payload of 1392 plus 28 bytes of headers equals 1420. Ping a host across the path you’re diagnosing (a LAN or internet address through the tunnel), since a clean ping to the tunnel endpoint doesn’t prove forwarded traffic gets the same path MTU. For IPv6, use ping -6 and subtract 48 bytes of headers instead.

ping -M do -s 1392 10.8.0.1
# -M do sets Don't Fragment; -s sets payload size

If that fails, set a lower MTU in [Interface].

1280 matches the IPv6 minimum link MTU. It’s a conservative fallback that sidesteps most blackholes but costs some throughput, so prefer the largest value that passes the ping test:

MTU = 1280

Clamp TCP MSS on the server so forwarded TCP flows fit:

sudo iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# Undo with the same rule using -D instead of -A

This only rewrites TCP SYNs forwarded through this host, so put it on whichever side routes traffic for other machines (usually the server). It does nothing for UDP or traffic the host generates itself; those still need a correct MTU. A rule added from the shell doesn’t survive a reboot, so add it to PostUp/PostDown if it fixes the problem.

Verify: ping -M do -s 1252 10.8.0.1 succeeds with MTU = 1280, and HTTPS loads normally.

Problem: Overlapping or Missing AllowedIPs

Symptoms:

  • ping: sendmsg: Required key not available
  • wg-quick up fails with RTNETLINK answers: File exists

Why it happens: AllowedIPs is both a routing table and an access filter.

Outgoing packets go to the peer with the longest-prefix AllowedIPs match. Overlapping ranges of different lengths are fine (the more specific one wins), but WireGuard doesn’t support the identical range on two peers of one interface, because it can’t choose between them. Treat that as a configuration conflict; wg-quick may also fail while installing the duplicate routes. A destination no peer claims has no key to encrypt with.

Fix: On the server, give each client a unique /32. Add LAN subnets only to the peer that actually routes them:

[Peer]
AllowedIPs = 10.8.0.2/32

On the client, list what goes through the tunnel. Use 0.0.0.0/0 for full tunnel, or 10.8.0.0/24, 192.168.1.0/24 for split tunnel.

Verify: ip route get 192.168.1.50 shows dev wg0.

Problem: CGNAT Keepalive Timeout

Symptoms:

  • The tunnel works right after connecting, then goes silent after a few idle minutes
  • The server can’t reach the client until the client sends something

Why it happens: WireGuard stays quiet when idle. CGNAT boxes drop UDP mappings they haven’t seen traffic on, and inbound packets then hit nothing.

Fix: On the peer behind NAT, add this to its [Peer] section:

PersistentKeepalive = 25

The trade-off is a small packet every 25 seconds, which adds a little battery drain on phones.

Verify: wg show reports persistent keepalive: every 25 seconds, and the handshake stays under two minutes old.

Error Messages

MessageMeaning
Required key not availableUsually: destination not in any peer’s AllowedIPs, or the peer isn’t configured
RTNETLINK answers: File existsRoute or address conflict on interface up
ping: local error: message too long, mtu=1420Payload exceeds the interface MTU

Platform-Specific Fixes

Linux

Run sudo wg-quick down wg0 && sudo wg-quick up wg0 after edits. The NixOS wiki covers declarative equivalents.

macOS

Edit the tunnel in the WireGuard app and add MTU or PersistentKeepalive lines directly to the config text.

WireGuard app tunnel edit window showing MTU = 1280 and PersistentKeepalive = 25 in the config text

iOS

Open the tunnel’s edit view to find the MTU and persistent keepalive options; exact field labels and navigation can vary by app version.

Logs are available from within the app.

WireGuard iOS tunnel edit screen with MTU and Persistent keepalive fields visible

Android

Edit the tunnel to find the MTU and persistent keepalive options; field placement can vary by app version.

Mobile carriers commonly use CGNAT, so treat keepalive as the default here.

WireGuard Android tunnel editor showing MTU and Persistent keepalive fields

Getting Help

Collect wg show, ip route, sysctl net.ipv4.ip_forward, and iptables -S output with private keys removed. On Linux, journalctl -u wg-quick@wg0 shows interface bring-up errors.

Prevention Tips

  • Persist sysctls: keep forwarding in /etc/sysctl.d/, never only via sysctl -w
  • Set MTU explicitly on known-small links: test PPPoE or mobile paths and set the largest MTU that passes, rather than relying on defaults
  • Use one /32 per client: it avoids AllowedIPs collisions as peers grow

Wrapping Up

Read the transfer counters first, and they’ll point you at the failing layer before you touch config. For roaming clients behind NAT, PersistentKeepalive = 25 is a cheap default; lower the MTU only where the path test shows you need to. Last check: reboot the server, reconnect a client, and confirm wg show shows a fresh handshake with both counters climbing.

Applies to WireGuard on Linux, macOS, iOS and Android