FULL AI ANALYSIS

WireGuard tunnel: large TCP uploads stall after MTU reduction on Debian 12 server

Generated Oct 28, 2026, 9:44:48 AM

Analysis summary

The symptoms point to large aggregated packets (GSO/GRO/TSO) being formed at the sender or NIC and not being split before WireGuard encryption and encapsulation, producing packets larger than the outer path MTU. Those oversized packets can be dropped or mishandled after encapsulation, causing retransmits and stalls. Disabling offloads on the physical NIC forces proper segmentation and resolves the issue, which implicates hardware offload + tunnel encapsulation interaction. Secondary contributors: MSS/PMTU mismatch and NAT/iptables rules not being applied at the correct hook so clamping is skipped for forwarded/encrypted flows; conntrack-bypass/raw PREROUTING rules can prevent mangle-clamp from seeing traffic. Kernel-level GRO behaviour on tunnel endpoints or a driver bug could also exacerbate the problem.

Possible causes

Large segment offloading (GSO/GRO/TSO) causes oversized aggregated segments that are not segmented before WireGuard encrypts/encapsulates them — outer packet exceeds MTU and gets dropped or mishandled.

90%

MSS/PMTU mismatch: TCP peers use large MSS and PMTU discovery fails across the encapsulated path (ICMP blocked or not observed), so senders continue sending segments that become too big after encapsulation.

60%

iptables mangle TCPMSS clamping not applied because a raw/conntrack-bypass or FORWARD chain ordering prevents the rule from seeing the pre-NAT packet before encapsulation.

40%

Kernel or NIC driver bug in how GRO/GSO interacts with tunnel endpoints (WireGuard + Ethernet driver) causing reassociation of segment sizes post-encryption.

30%

Suggested fixes

1

Diagnostic step 1

Reproduce while capturing both sides: run tcpdump -s0 -w client.pcap on client (wg0) and tcpdump on server physical interface to show packets after encapsulation. Compare segment sizes.

2

Diagnostic step 2

Temporarily disable offloads on server NIC and WireGuard host to confirm: ethtool -K eth0 gso off gro off tso off; ethtool -K wg0 gso off gro off tso off. Verify long upload completes.

3

Diagnostic step 3

If disabling offloads fixes it, avoid global disable by: a) set wg0 MTU conservatively (e.g., 1420) and retest; b) add iptables mangle FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu (ensure it matches the PREROUTING/forwarding path) and confirm it sees forwarded packets (use conntrack -L or tcpdump to verify), or use nftables equivalent.

4

Diagnostic step 4

Try enabling kernel TCP MTU probing: sysctl -w net.ipv4.tcp_mtu_probing=2 to allow endpoints to probe and discover lower PMTU.

5

Diagnostic step 5

If persistent: upgrade NIC driver/kernel or check vendor release notes for offload/tunnel fixes; consider per-interface offload toggles in systemd-networkd/udev to target only problematic interfaces.