Solution:
Root Cause: Path MTU Mismatch & ICMP Type 3 Code 4 (Fragmentation Needed) Blockade When network packets exceed the Maximum Transmission Unit (MTU) of an intermediate link (common with IPsec/GRE tunnels or PPPoE connections), routers drop the packet and return an ICMP
Destination Unreachable: Fragmentation Needed packet. If a firewall blocks this ICMP message, Path MTU Discovery (PMTUD) fails, resulting in a 'PMTUD Blackhole' where small TCP handshakes succeed, but large data transfers lock up and time out.
Step-by-Step Fix: 1 Determine Maximum Unfragmented Path MTU:
Run ICMP ping tests with the Don't Fragment (DF) flag set: Windows: Copy
cmd
ping -f -l 1472 target-domain.com
Linux: Copy
bash
ping -M do -s 1472 target-domain.com
Lower packet payload size (-l or -s) by 10-byte increments until pings succeed without fragmentation messages. Add 28 bytes (20-byte IP header + 8-byte ICMP header) to calculate actual Path MTU. 2 Adjust Interface MTU (If Local Interface exceeds Path MTU):
Set interface MTU to match the discovered path maximum (e.g., 1492 for PPPoE or 1400 for VPNs): Copy
bash
sudo ip link set dev eth0 mtu 1492
3 Configure TCP MSS Clamping on Router / Gateway:
Clamp maximum segment size (MSS) for TCP SYN packets to automatically fit PMTUD: Copy
bash
sudo iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu