Skip to content
VDS · Network, IP address and domains

MTU 1420: why some sites may hang and how to fix it

What MTU is, where 1420 comes from, what the “page hangs halfway” problem looks like, and how to check and fix it.

Updated August 23, 2026

MTU is the maximum packet size that can be sent over a network without fragmentation. The usual value on Ethernet is 1500 bytes. When traffic goes through a tunnel, its own headers take up part of the space, leaving less payload: a typical value is 1420.

By itself, this isn't a problem. Problems start when one side believes it can send 1500, but there's a segment with 1420 along the path and the message about it gets lost.

What the symptom looks like

  • SSH connects, the greeting arrives, but ls in a large directory hangs the session.
  • A page starts loading and freezes halfway.
  • curl -I (headers only) works, but a full curl hangs.
  • apt update succeeds, apt upgrade stalls while downloading.
  • Small requests fly, large responses never arrive.

The common sign is the same: small packets get through, large ones disappear without an error. The connection doesn't drop; it just goes silent.

The reason is that the packet size negotiation mechanism relies on ICMP service messages. If something filters them along the path, the sender never learns that the packet is too large and keeps sending it again and again.

Check

Send a packet with the don't-fragment bit set and reduce the size until it gets through:

ping -M do -s 1472 -c 2 1.1.1.1
ping -M do -s 1392 -c 2 1.1.1.1

The -s size has 28 bytes of headers added to it: 1472 corresponds to MTU 1500, and 1392 to MTU 1420. If the first option fails and the second succeeds, you've found the limit.

The current interface value:

ip link show
ip route get 1.1.1.1

How to fix it

One-time check:

ip link set dev eth0 mtu 1420

Permanently, via systemd-networkd — file /etc/systemd/network/10-eth0.network:

[Match]
Name=eth0

[Link]
MTUBytes=1420
systemctl restart systemd-networkd

If NetworkManager manages the network:

nmcli connection modify "System eth0" 802-3-ethernet.mtu 1420
nmcli connection up "System eth0"

A second technique, useful when you can't touch MTU, is to clamp the TCP segment size at the boundary. In nftables:

tcp flags syn tcp option maxseg size set rt mtu

When this affects you

On a Millida VDS machine itself, the network is configured properly, and you usually don't need to touch MTU manually. You have to deal with it when you set up a tunnel yourself: WireGuard, OpenVPN, GRE, a VPN to the office, or a link between machines. Inside a tunnel, MTU is always smaller, and you need to set it explicitly.

For WireGuard in the [Interface] section:

MTU = 1420

Common mistakes

MistakeConsequence
Blocking ICMP entirely in the firewallYou break packet size negotiation for yourself
Setting MTU on only one side of the tunnelTraffic hangs in one direction
Changing MTU at randomYou hide the real cause: packet loss or a service error

Don't touch MTU until you've reproduced the symptom with the ping -M do command. Without that check, you're changing a working configuration based on a guess — and getting a new problem instead of the old one. Don't block ICMP entirely; see nftables.