Privacy Tools Guide

VPN fragmentation happens when packets exceed MTU (Maximum Transmission Unit) limits because VPN headers add 50-100 bytes overhead to every packet; firewalls block ICMP PMTUD (Path MTU Discovery) messages, preventing automatic detection of optimal packet sizes. Fix it by reducing MTU to 1400-1450 bytes (lower than the standard 1500) to account for VPN overhead, disabling path MTU discovery if it’s being blocked, or configuring your VPN client to fragment packets at the application layer rather than at the network layer.

What Causes VPN Fragmentation Issues

Fragmentation happens at multiple levels of the network stack:

MTU Misconfiguration

Maximum Transmission Unit (MTU) defines the largest packet size your network can handle. When VPN headers get added to packets, they can exceed the MTU, causing fragmentation or drops:

Path MTU Discovery Problems

Path MTU Discovery (PMTUD) should automatically detect the largest packet size that can traverse the path. However, firewalls often block the ICMP packets needed for PMTUD to work, leaving your VPN unable to discover optimal packet sizes.

Double NAT Issues

When your VPN connects through a NAT device with unknown MTU settings, fragmentation can occur at multiple points, compounding the problem.

VPN Protocol Issues

Different VPN protocols handle fragmentation differently:

Symptoms of Fragmentation Problems

Recognizing fragmentation issues helps you diagnose the problem quickly:

Websites Failing to Load

Pages partially load or timeout completely. You might see:

Slow Loading Pages

Fragmented packets take longer to reassemble:

Specific Services Breaking

Some websites fail while others work fine:

Connection Drops

Severe fragmentation can cause connections to drop entirely:

Diagnosing Fragmentation Issues

Check Current MTU Settings

# Linux - check interface MTU
ip link show

# Windows - check MTU settings
netsh interface ipv4 show subinterfaces

# macOS - check MTU settings
networksetup -listallhardwareports

Test Path MTU to VPN Server

# Test MTU with ping (Linux/macOS)
ping -M do -s 1400 vpn.server.com

# Windows equivalent
ping -f -l 1400 vpn.server.com

Reduce the packet size (1400 is a safe starting point) until pings succeed without the “Packet needs to be fragmented” error.

Use Traceroute with MTU Discovery

# Linux - traceroute with MTU discovery
traceroute -M do -w 2 -s 1400 vpn.server.com

# Use mtr for detailed analysis
mtr -c 100 --psize 1400 vpn.server.com

Check for ICMP Filtering

# Test if ICMP is getting through
ping -c 3 -M do -s 1400 8.8.8.8
ping -c 3 -M do -s 1472 8.8.8.8

If smaller packets work but larger ones fail, you likely have an MTU issue.

Fixing VPN Fragmentation Issues

Solution 1: Set Correct MTU on VPN Interface

# Linux - set MTU on WireGuard interface
sudo ip link set dev wg0 mtu 1420

# Linux - set MTU on OpenVPN interface
sudo ip link set dev tun0 mtu 1420

# Persist WireGuard MTU in config
# Add to /etc/wireguard/wg0.conf:
[Interface]
MTU = 1420

Solution 2: Clamp MSS in Firewall Rules

Add iptables rules to clamp the Maximum Segment Size:

# Linux - clamp MSS for VPN traffic
sudo iptables -A FORWARD -i wg0 -o eth0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1536 -j TCPMSS --clamp-mss-to-pmtu

# For IPv6
sudo ip6tables -A FORWARD -i wg0 -o eth0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1536 -j TCPMSS --clamp-mss-to-pmtu

Windows Server and routers can configure similar rules.

Solution 3: Enable Fragmentation in VPN Config

WireGuard

WireGuard handles fragmentation automatically in most cases, but you can explicitly set MTU:

[Interface]
MTU = 1420

OpenVPN

Add these options to your client configuration:

# Reduce UDP packet size
mssfix 1400

# Enable fragment detection
fragment 1400

# Set maximum packet size
tun-mtu 1400
tun-mtu-extra 32

IKEv2/IPSec

Configure MTU in strongSwan:

# /etc/strongswan.conf
charon {
    mtu = 1420
    fragment_size = 1400
}

Solution 4: Switch VPN Protocol

If fragmentation persists, try a different protocol:

Solution 5: Reduce Packet Size Globally

Set a conservative MTU that works across most networks:

# Linux - set system-wide MTU
sudo ip link set dev eth0 mtu 1400

# Add to /etc/network/interfaces for persistence:
auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    mtu 1400

Solution 6: Handle Specific Problematic Services

For services that consistently fail:

# Use curl with reduced packet size
curl --mtu 1400 https://problematic-site.com

# Test with wget
wget --mtu=1400 https://problematic-site.com

Troubleshooting Specific Scenarios

Streaming Services Not Working

Streaming services are particularly susceptible to fragmentation:

  1. Try different server - some have better MTU handling
  2. Use browser extension - some can force smaller packets
  3. Contact VPN provider - they may have optimized servers
  4. Try split tunneling - exclude the streaming service from VPN

Video Calls Freezing

Real-time applications need consistent packet delivery:

# In WireGuard config, enable persistent keepalive
[Peer]
PersistentKeepalive = 25

API Connections Timing Out

APIs often have strict timeout settings:

Game Servers Disconnecting

Gaming requires low latency:

Advanced Solutions

Using tcpdump to Diagnose

Capture packets to see fragmentation in action:

# Capture on VPN interface
sudo tcpdump -i wg0 -n -v | grep -i fragment

# Look for packet loss
sudo tcpdump -i wg0 -n 'tcp[13] & 4 != 0'

# Check for retransmissions
sudo tcpdump -i wg0 -n 'tcp[13] & 2 != 0'

Implementing BBR Congestion Control

BBR (Bottleneck Bandwidth and Round-trip propagation time) can help with VPN throughput:

# Enable BBR
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr
sudo sysctl -w net.core.default_qdisc=fq

# Make persistent
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf

Custom DNS Configuration

Sometimes DNS contributes to fragmentation:

# Use DNS with lower packet sizes
# Cloudflare: 1.1.1.1
# Google: 8.8.8.8
# Quad9: 9.9.9.9

# Configure in WireGuard:
[Interface]
DNS = 1.1.1.1

Prevention Best Practices

  1. Test after network changes - when switching networks, verify VPN works
  2. Keep VPN client updated - newer versions handle fragmentation better
  3. Document working configurations - note which MTU works for which servers
  4. Use providers with infrastructure - better servers mean fewer issues
  5. Monitor connection quality - watch for degradation over time

When to Contact Your VPN Provider

Contact support if:

Provide diagnostic information:

Built by theluckystrike — More at zovo.one