Networking

Large TCP uploads stall over WireGuard peer after MTU reduction on Linux server

Environment

Environment

Two Ubuntu 22.04 servers running WireGuard kernel module (wg-quick v1.0.20220411). Both endpoints NATed behind consumer routers. Physical NICs MTU 1500; wg0 configured with MTU 1280 on both ends. Raw iptables rule present to bypass conntrack for tunnel traffic on server A.

Symptoms

Symptoms

Large scp/rsync uploads (multi-megabyte files) stall after ~300–700 KB transferred; small requests and ICMP succeed. Stalls are transient — restarting transfer often resumes briefly. Windows client transfers through same path succeed.

Observations

Observations

tcpdump on server A shows forward data segments sent continuously after stall; server B's tcpdump shows no corresponding ACKs after stall. Disabling TSO/GSO on wg0 (ethtool -K wg0 tso off gso off) makes the large transfers complete. Enabling sysctl net.ipv4.tcp_mtu_probing=1 reduces occurrences but doesn't eliminate them. conntrack-bypass raw PREROUTING rule present.

Already attempted

Already attempted

Restarted WireGuard, disabled offloads on wg0 and on underlying phys NIC, temporarily removed raw conntrack bypass rule, ran iperf3 (unaffected for small flows), captured pcap during failure, verified router NAT didn't show fragment drops.

Question

Question

What is causing large TCP uploads to stall over WireGuard after MTU reduction, and how can I restore reliable large-transfer throughput without disabling offloads globally or drastically reworking firewall rules?

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

PMTU/MSS mismatch between physical NIC and wg interface causing large packets not to be segmented before hitting tunnel path 90%
Kernel/NIC offload (TSO/GSO) producing large skbs that don't get correctly segmented for the WG MTU (offload regression) 80%
Raw PREROUTING conntrack-bypass rule preventing kernel from doing MSS clamping or fragment handling on tunneled packets 70%

Summary

Behavior matches a PMTU/MSS black-hole caused by packet offloading interacting with a reduced MTU on the WireGuard device and a conntrack-bypass path. When kernel offloads (TSO/GSO) are enabled, the host may present large frames to the NIC that are not being properly segmented to the tunnel MTU; conntrack bypass prevents the kernel from adjusting MSS or handling fragmentation properly. Disabling offloads on the tunnel device or forcing MSS clamping prevents oversized packets from being sent and resolves the stall. Other contributors could be downstream NAT/firewall dropping fragments or a driver regression, but the immediate symptom and the fact disabling offloads fixes it point to offload + MTU mismatch as root cause.

Suggested Fixes

Diagnostic step 1
Test for MTU/MSS black hole: from client run ping -s <size> -M do to the peer tunneled IP to determine largest path MTU.
Diagnostic step 2
Enable TCP MSS clamping on tunnel flows on both endpoints (iptables mangle TCPMSS clamp to PMTU) and verify large transfers.
Diagnostic step 3
Temporarily disable TSO/GSO/LRO on the wg interface only (ethtool -K wg0 tso off gso off lro off) and confirm transfers complete; this is reversible.

Continue troubleshooting

Matched from the title, description and tags