Networking

WireGuard: Large TCP uploads stall after MTU lowered on Linux server while small requests succeed

Environment

Environment

Ubuntu 22.04 LTS server running WireGuard (linux kernel 5.15, wireguard-tools 1.0.20220513). Peers include macOS 12.6 and Ubuntu 20.04 laptops. wg0 MTU was recently changed from 1420 to 1280 to accommodate an intermediate tunnel.

Symptoms

Symptoms

Large TCP uploads (scp/rsync/HTTP POST uploads > ~1.5–2 MiB) stall — throughput rises briefly then drops to near zero and the transfer hangs. Small requests and downloads complete normally; UDP-based tests show steady throughput.

Observations

Observations

tcpdump on server's wg0 shows the TCP sender continuing to send segments but the peer stops ACKing after the stall point. No RSTs seen. ping with large packet sizes (fragmentation) fails when DF set. iperf3 short tests and small-block transfers succeed. No kernel OOM. No obvious WireGuard error logs. No stateful firewall hits in server logs.

Already attempted

Already attempted

Adjusted wg0 MTU up/down on both ends; added iptables MSS clamp on server NAT rules; toggled KeepAlive and PersistentKeepalive; disabled firewall temporarily; tested over different public networks; restarted wg-quick on both ends. Temporary improvement when disabling TCP offloads on the host (ethtool -K <if> tso off gso off), but not a permanent fix.

Question

Question

What is most likely causing large-TCP uploads to stall after changing MTU, and how can I reliably diagnose and mitigate this without breaking existing connectivity?

COMMUNITY RESPONSES

Verified community troubleshooting

0 replies

No answers yet..

Showing 0 of 0 community responses
AI DIAGNOSTICS

Incident analysis

Updated 1mo ago• Trouble ID

Most likely causes

Path MTU black hole: ICMP 'fragmentation needed' blocked on path, so TCP doesn't reduce MSS and large segments are dropped inside the tunnel. 80%
TCP offloads (TSO/GSO) produce large frames that are not handled correctly by host NIC driver or by an intermediate device when encapsulated in WireGuard. 60%
WireGuard MTU mismatch or misconfigured MTU on one peer, leading to packets larger than the tunnel can forward. 50%

Summary

Symptoms point to a PMTU/MSS black hole or offload behavior where large TCP segments get dropped or not fragmented when sent through the WireGuard tunnel. The fact small transfers and UDP succeed, and disabling offloads helps, suggests either ICMP 'Fragmentation needed' messages are being blocked on the path (so endpoints never reduce segment size), or large frames created by TSO/GSO are being mishandled by a NIC/driver or by the tunnel endpoint. Other possibilities include a WireGuard MTU mismatch between peers, NAT/conntrack fragmentation issues on an intermediate router, or a hardware NIC bug that surfaces only for encapsulated traffic.

Suggested Fixes

Diagnostic step 1
Reproduce reliably with iperf3 and with a raw TCP transfer while running tcpdump on both endpoints (capture both inside and outside the WireGuard interface).
Diagnostic step 2
On both ends, disable TCP offloads temporarily (ethtool -K <if> tso off gso off gro off) — if this consistently removes the stall, collect ethtool -k and ethtool -S outputs to correlate with NIC driver.
Diagnostic step 3
Verify ICMP 'fragmentation needed' reaches the sender: run traceroute -F/MTU-path tests or use ping -M do -s <size> to detect the largest transmissible packet. If ICMP blocked, enable/allow ICMP on intermediate devices or configure MSS clamp on the edge.

Continue troubleshooting

Matched from the title, description and tags