Networking

GRE tunnel drops fragmented packets >1400B only when raw PREROUTING conntrack-bypass rule is present on Linux router

viggovpn
1mo ago
Environment

Environment

Linux router (kernel 5.15) using iptables-nft for NAT/forwarding, GRE tunnel between two sites; MTU negotiated 1500->1476 for GRE overhead. A custom iptables raw table PREROUTING rule marks some traffic - NOTRACK to bypass conntrack for high-throughput flows.

Symptoms

Symptoms

Large TCP transfers across GRE stall or drop (many retransmits) when packet size exceeds ~1400 bytes. Small requests OK. Problem appears only when raw NOTRACK rule active. Captures show fragments sent but never reassembled at peer.

Observations

Observations

tcpdump on ingress shows GRE-encapsulated packets with DF set fragmenting at outer MTU; inner packets sometimes split into fragments. When NOTRACK removed, flows succeed. sysctl net.ipv4.ip_forward and ip_conntrack counters normal. Offloads (GSO/GRO) enabled on interfaces.

Already attempted

Already attempted

Disabled iptables raw rule — problem gone. Toggled GSO/GRO/TSO off on GRE and physical NICs — mitigated but performance reduced. Adjusted MTU on endpoints to 1400 — fixed, but disruptive to other flows.

Question

Question

Why does marking packets NOTRACK in raw PREROUTING cause GRE-encapsulated fragmented packets to be dropped, and how to keep conntrack bypass without breaking large transfers?

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

NOTRACK prevents conntrack-assisted segmentation rework for encapsulated packets when GSO/GRO/TCP segmentation offloads are active 90%
Kernel bug in nic driver or GRE path causing incorrect checksum/flags when conntrack bypassed 40%
MTU mismatch combined with unexpected DF handling due to raw table ordering 30%

Summary

Bypassing conntrack disables certain kernel helpers that may handle fragmented or offloaded packets correctly for tunneling. GSO/GRO produce large skbs that require segmentation before encapsulation; conntrack can trigger proper segmentation path. When NOTRACK is set, the networking stack may skip re-segmentation for encapsulation, leading to oversized fragments that peers drop. Turning off offloads forces segmentation but impacts CPU.

Suggested Fixes

Diagnostic step 1
Avoid NOTRACK for GRE traffic: restrict raw rule to only non-GRE flows or add exception to not match GRE protocol.
Diagnostic step 2
If NOTRACK needed, disable GSO/GRO/TSO on the GRE/physical interfaces (ethtool -K) and monitor CPU impact.
Diagnostic step 3
Adjust MTU on endpoints to safely account for GRE overhead (eg. reduce by 64) as interim.

Continue troubleshooting

Matched from the title, description and tags