Check your connection
Links and subscriptions
WireGuard MTU calculator: which MTU to set
WireGuard adds 60 bytes to every packet over IPv4 and 80 over IPv6, so the tunnel's MTU is the line's MTU minus that. Pick your line and the server's address type and get the number for MTU = in [Interface], with ping commands to measure the line and check the tunnel. Too big an MTU is the classic cause of pages that half-load and downloads that hang.
Runs in your browser, nothing is sent
Measure your line
With the VPN off, ping the server with packets that must not be split. If the answer says the packet needs to be fragmented, lower the size by 10 and repeat. The line's MTU is the largest size that passed plus 28.
Windows
ping -f -l 1472 1.1.1.1macOS
ping -D -s 1472 -c 3 1.1.1.1Linux
ping -M do -s 1472 -c 3 1.1.1.1Tunnel MTU
MTU = 1420
1500 − 40 IPv6 − 8 UDP − 32 WireGuard = 1420
For [Interface] in the config
MTU = 1420This is WireGuard's own default: it fits any network with MTU 1500, over IPv4 and IPv6.
Not sure counts as IPv6: its headers are bigger, so the number fits both.
Check the tunnel
With the VPN on, these pings must come back. If they don't, lower the MTU by 20 and try again.
Windows
ping -f -l 1392 1.1.1.1macOS
ping -D -s 1392 -c 3 1.1.1.1Linux
ping -M do -s 1392 -c 3 1.1.1.1VLESS, Trojan, VMess and Shadowsocks over TCP don't need this: TCP adjusts its own packet size.
Everything is worked out in your browser: keys and addresses are not sent anywhere.
Reference
What WireGuard adds to a packet
Every data packet gets an outer IP header, a UDP header and WireGuard's own 32 bytes: a 16-byte header and a 16-byte tag. The table is worked out by the same code as the calculator.
| Protocol | Server on IPv4 | Server on IPv6 |
|---|---|---|
| WireGuard, AmneziaWG 1.x | 60 | 80 |
| AmneziaWG 2.0 | 60 + S4 | 80 + S4 |
Ready numbers
| Line MTU | Server on IPv4 | Server on IPv6 |
|---|---|---|
| 1500 | 1440 | 1420 |
| 1492 | 1432 | 1412 |
| 1480 | 1420 | 1400 |
| 1460 | 1400 | 1380 |
| 1420 | 1360 | 1340 |
| 1400 | 1340 | 1320 |
FAQ
What MTU should I use for WireGuard?
1420 fits any network with MTU 1500, over IPv4 and IPv6: that is WireGuard's own default. With a server on IPv4, 1440 is enough. On PPPoE (1492), take 1412. On narrower networks, measure the line first.
Why do pages half-load with a VPN?
Packets bigger than the network carries are lost without a word: small requests pass, big ones don't. Lower the tunnel's MTU and the big pages come through.
Is a lower MTU always safe?
Down to 1280 it always works and costs a little speed. Below 1280, IPv6 inside the tunnel stops working.
Does AmneziaWG need a different MTU?
AmneziaWG 1.x adds nothing to data packets, so its numbers are WireGuard's. AmneziaWG 2.0 grows every data packet by S4 bytes: subtract S4 too.
Do I need to set MTU for VLESS or Trojan?
No: over TCP the packet size adjusts itself. In Veli, Diagnostics → Check measures the path MTU and, when it is under 1280, says which tunnel MTU to set.
Links, subscriptions and configs open in Veli, a free client for Windows, macOS, Linux and Android. Download Veli