FULL AI ANALYSIS

GRE site-to-site: large TCP uploads stall after MTU lowered when conntrack-bypass raw rule present

Generated Oct 23, 2026, 9:39:07 AM

Analysis summary

Stalls are classic PMTU black hole behavior: ICMP 'fragmentation needed' messages are required for path MTU discovery. Raw conntrack-bypass or --notrack can prevent conntrack from associating responses with tracked flows; in some kernels or iptables setups, these bypassed packets are not subject to the normal connection tracking that would allow ICMP errors to be delivered to sockets or forwarded correctly. Additionally GRE encapsulation reduces effective MTU; if MSS is not clamped, endpoints keep sending large segments. Removing the conntrack bypass or explicitly allowing/forwarding ICMP type 3 code 4 fixed the issue in tests. TCP MSS clamping on the tunnel or reducing endpoint MTU are workarounds. Permanent fixes: allow PMTU ICMP through, add TCP MSS clamp for tunneled traffic, or adjust raw rule to exempt traffic that needs PMTU handling.

Possible causes

Firewall/raw PREROUTING conntrack-bypass prevents ICMP 'fragmentation needed' from being delivered or forwarded correctly, causing PMTU black hole

95%

GRE encapsulation reduced MTU but no TCP MSS clamp configured on tunnel endpoints, allowing oversized segments

70%

Kernel offload/segmentation offload combined with tunnel MTU mismatch causes large frames to be sent and dropped in-path

40%

Asymmetric routing where ICMPs return via different path filtered by firewall, independent of conntrack bypass

25%

Suggested fixes

1

Diagnostic step 1

Reproduce with tcpdump on both tunnel endpoints and an intermediate hop while toggling the raw PREROUTING rule to confirm ICMP delivery path.

2

Diagnostic step 2

Short-term safe fix: add a TCP MSS clamp on the GRE interface (iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -o gre+ -j TCPMSS --clamp-mss-to-pmtu) or set mtu on tunnel to 1400–1420 to avoid fragmentation.

3

Diagnostic step 3

If you must keep conntrack bypass, explicitly allow ICMP Type 3 Code 4 through the firewall chain used for tunnel traffic so PMTU messages reach the sender.

4

Diagnostic step 4

For higher throughput without full conntrack: tune NIC offloads (disable GSO/TSO on tunnel interface) and test, or create targeted conntrack exemptions only for flows that don't require ICMP feedback.

5

Diagnostic step 5

Monitor after changes using iperf3 large-transfer tests and tcpdump to verify that ICMP 'fragmentation needed' packets are visible and that TCP MSS negotiation results in smaller segments.