Networking

WireGuard peer connects but cannot reach remote LAN hosts — TCP times out while ICMP intermittently passes

Environment

Environment

Small office with WireGuard server on Debian 12 gateway (wg0 peer-to-peer) that NATs clients to LAN. WireGuard server routes 10.0.10.0/24 and NATs to 192.168.1.0/24. Remote peer on macOS/Android can establish handshake and ping the server IP, but connections to devices on remote LAN (printers, SMB server) time out for TCP while some ICMP sometimes succeeds.

Symptoms

Symptoms

WireGuard handshake succeeds; ping to gateway internal IP usually works. TCP connections (HTTP, SMB) to LAN hosts hang and eventually timeout. Traceroute from client to LAN host shows first hop to WireGuard gateway then stalls. On the gateway, conntrack shows entries for client IP but destination responses don't reach client consistently. Some ICMPs get replies but larger TCP flows fail.

Observations

Observations

iptables NAT rule present (POSTROUTING -s 10.0.10.0/24 -o eth0 -j MASQUERADE). sysctl net.ipv4.ip_forward=1. MSS clamping not configured. tcpdump on gateway shows inbound SYN from client forwarded to LAN host, LAN host replies with SYN-ACK to gateway, but gateway sends reply back to client after NAT; sometimes gateway drops replies with 'invalid conntrack' entries. MTU on wg0 is default (1420) with path MTU on some broadband links causing fragmentation. conntrack table shows some dropped replies labeled INVALID.

Already attempted

Already attempted

Added explicit route on LAN hosts to send client subnet back to gateway (not relying on NAT) — no improvement. Flushed conntrack, increased conntrack max (net.netfilter.nf_conntrack_max), temporarily solved a few sessions but problem recurred under moderate concurrency. Tried enabling ip_forward proxy_arp off/on, no consistent fix.

Question

Question

Why do TCP flows to LAN hosts through WireGuard establish handshake intermittently or fail while pings sometimes work? What kernel/network settings (MSS clamping, conntrack, MTU) should be adjusted and in what order to troubleshoot safely?

COMMUNITY RESPONSES

Verified community troubleshooting

0 replies

No answers yet..

Showing 0 of 0 community responses
AI DIAGNOSTICS

Incident analysis

Updated 4w ago• Trouble ID

Most likely causes

PMTU/MSS black hole: WireGuard MTU or underlying path MTU too large causing TCP segments to be dropped, while small ICMP manage to pass. 80%
Conntrack/NAT table exhaustion or stale/INVALID entries leading to dropped replies for TCP flows. 65%
Asymmetric routing on LAN hosts causing replies to bypass gateway so conntrack sees invalid replies. 50%

Summary

Symptoms suggest either MTU/MSS black-holing causing TCP handshakes to fail or conntrack/NAT translation inconsistencies dropping established flows. ICMP small packets may pass while larger TCP segments that require fragmentation fail. Conntrack showing INVALID entries indicates asymmetric routing or stale mapping. NAT with MASQUERADE can cause replies to use wrong source or get dropped if conntrack table entries become invalid; missing MSS clamping can break TCP when underlying path MTU is too small.

Suggested Fixes

Diagnostic step 1
Check MTU path: from client run ping -M do -s <size> to find largest unfragmented packet. Reduce WireGuard MTU (e.g., set MTU=1360) and test TCP connect again.
Diagnostic step 2
Enable MSS clamping on the gateway for TCP SYN packets: e.g., use nftables/iptables to clamp MSS to PMTU (iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu) and observe.
Diagnostic step 3
Monitor conntrack table (conntrack -L) and increase nf_conntrack_max temporarily; check dmesg for conntrack drops.

Continue troubleshooting

Matched from the title, description and tags