MTU and MSS: Why Large Responses Hang in Tunnels and How to Pick the Right Value
Table of contents
- Introduction: what mtu is and why this guide will save you hours of debugging
- Preparation
- Basic concepts: mtu, mss, fragmentation and black holes
- Step 1: confirming the problem is really about mtu
- Step 2: measuring the real path mtu with ping and the df bit
- Step 3: calculating a safe mtu and mss value
- Step 4: applying mtu on the device interface
- Step 5: setting up mss clamping on the gateway
- Step 6: locking in the result and preparing a rollback
- Verifying the result
- Common mistakes and their solutions
- Additional capabilities and advanced debugging
- Faq: answers to common questions
- Conclusion
Introduction: What MTU Is and Why This Guide Will Save You Hours of Debugging
You've probably run into a situation that feels like magic. Small pages load instantly, ping works, SSH connects, but the moment you request a large response through a tunnel or proxy, the connection freezes. No errors, no timeout in the logs, just endless waiting. In the vast majority of such cases, the culprit is a wrong MTU, or more precisely, a mismatch between the packet size your computer is ready to send and the size that actually gets through every segment of the route.
This step-by-step guide will take you from the first symptoms to a working configuration. In the end, you'll be able to confidently answer three questions: is the problem really about MTU, which value suits your specific route, and how to lock it in so it doesn't reset after a reboot. You'll understand how MTU and MSS relate, why ping alone isn't enough, and what to do if ICMP is blocked along the path.
Who this guide is for
- For those working with mobile proxies, modems and tunnels who see large responses "hanging".
- For small network administrators who need to set up MSS clamping on a gateway without diving deep into theory.
- For developers of scrapers and automations whose scripts through a proxy only receive part of the data.
What you need to know beforehand
A basic understanding of what an IP address, a port and a command line are is enough. All commands are given in full, with an explanation of every parameter. If you're opening a terminal for the first time, just copy the lines exactly as they are.
How long it will take
Diagnostics take about fifteen minutes. Selecting and applying the value takes another half hour. If you have a router with a non-standard firmware, allow extra time to find the right menu. Overall, plan for about an hour of unhurried work.
Preparation
Before you change anything, gather your tools and record the current state. This is the main principle of any network configuration: first write down how it was, then change it, then verify.
Required tools and access
- A computer with administrator rights. In Windows, commands to change MTU require running the console as administrator; in Linux and macOS you'll need sudo.
- The ping utility with support for disabling fragmentation. It's available on all operating systems by default.
- curl to test downloading large responses through a proxy. In Windows 10 and 11 curl is built in, in Linux it's installed as a package, in macOS it's available out of the box.
- Access to the gateway or router if you want to fix the problem for the whole network, not just one device.
- Proxy or tunnel details: address, port, login and password. For Proxeon mobile proxies, keep both ports handy: as of 22.09.2026 the SOCKS5 port equals the HTTP port plus one, so you can test both protocols.
What to download and install
- Make sure curl is available. Open a terminal and type
curl --version. You should see a version number and a list of protocols. - On Linux, install tcpdump if needed:
sudo apt install tcpdumpfor Debian and Ubuntu. It will come in handy at the advanced stage. - If you work with MikroTik, make sure you have access via WinBox or SSH.
Backing up current settings
Changing MTU is reversible, but it's better to record the original values right away. Run one of the following commands and save the output to a text file:
- Windows:
netsh interface ipv4 show subinterfaces - Linux:
ip link show - macOS:
networksetup -getMTU en0
Warning: if you're configuring a remote server, never change the MTU on the interface you're connected through without a pre-prepared rollback. A value that's too small won't drop the session, but one that's too large or a typo in the interface name can leave you locked out.
Tip: on a remote server, before making changes, start a delayed rollback, for example sudo sh -c "sleep 300 && ip link set dev eth0 mtu 1500" &. If everything goes well, you'll cancel it in time; if not, the system will restore the original value on its own after five minutes.
Basic concepts: MTU, MSS, fragmentation and black holes
So the guide doesn't turn into magic spells, let's go over a few terms. There aren't many, and after this section all the steps will make sense.
What MTU is
MTU (Maximum Transmission Unit) is the maximum packet size a network interface is willing to send in one go, including the IP and TCP headers, but excluding the link-layer header itself. For ordinary Ethernet, the standard sets this at 1500 bytes. This is the number you'll see most often, and it's also the source of most problems, because along the way the packet passes through segments where 1500 bytes won't fit.
What MSS is
MSS (Maximum Segment Size) is the maximum amount of payload data within a single TCP segment. It doesn't include headers. If you take the MTU and subtract the IPv4 header (20 bytes) and the TCP header (20 bytes), you get the MSS. For an MTU of 1500, that's 1460 bytes. The key difference from MTU: MSS is announced when the TCP connection is established, in the very first packet with the SYN flag. Both sides tell each other what segment size they're willing to accept, and from then on they stick to the smaller of the two values.
That's why MSS is so convenient to adjust on a gateway. All you need to do is intercept the SYN packet and reduce the value it announces, and both sides will start sending smaller segments on their own. This technique is called MSS clamping, and we'll set it up in one of the steps.
Where tunnels come from and their overhead
Any tunnel, whether it's PPPoE from a home ISP, GRE between offices, IPsec, an SSH tunnel, or encapsulation in a mobile carrier's network, adds its own headers to the packet. A packet that took up 1500 bytes on your interface becomes 1500 plus several dozen bytes inside the tunnel. And the outer channel still only passes 1500. A conflict arises, and it needs to be resolved somehow.
In mobile networks the situation is even more interesting. Modem traffic passes through the carrier's core, where it's packaged in its own service protocols. Some carriers assign devices an address through IPv6-to-IPv4 translation (the 464XLAT mechanism), and then an IPv6 header, which is noticeably larger than an IPv4 header, is added to every packet. The specific available size depends on the carrier, the region and even the specific base station, so it needs to be measured, not guessed.
Fragmentation and the DF bit
If a packet doesn't fit into the channel, a router has two options. First: cut the packet into pieces, this is fragmentation. Second: drop the packet and send the sender an ICMP "Fragmentation Needed" message indicating what size will fit. Which option is chosen is decided by the DF (Don't Fragment) flag in the packet header. Modern systems almost always set DF, because fragmentation is expensive and unreliable.
Path MTU Discovery and why it breaks
The PMTUD (Path MTU Discovery) mechanism works like this: the sender sends packets with DF, receives an ICMP "too big" response, remembers the new size and retries with smaller pieces. Beautiful in theory. In practice, many firewalls and routers block ICMP entirely, considering it useless or dangerous. Then the sender gets no response, and the large packet simply disappears. This is the MTU black hole.
Why small packets get through but large ones don't
Now put it all together. A short HTTP response fits into one small segment that's below the real path MTU, and it's delivered without problems. A large response is split by the server into full-size segments, as announced in the MSS. The very first full-size segment doesn't get through the narrow segment, the ICMP doesn't reach the server, and the server retransmits the same size again and again. The client waits, the server waits. Externally this looks like a hang specifically on large responses, while small ones work perfectly. You received the page headers, but the body never arrives.
Tip: remember a simple rule. If ping and short requests work but long ones don't, check MTU first. This will save you hours hunting for non-existent problems in DNS, TLS and the proxy.
Step 1: Confirming the problem is really about MTU
Goal of this stage: to be sure the hangs are caused by packet size, not the proxy, the server or DNS. After this step, you either move on to measurements or look for the cause elsewhere.
- Open a terminal. In Windows press Win+R, type cmd and press Enter. In Linux and macOS open any terminal application.
- Check that the proxy or tunnel itself responds. Request a deliberately small resource:
curl -x http://login:pass@host:port -s -o NUL -w "%{http_code} %{size_download}" https://example.com/. In Linux and macOS use /dev/null instead of NUL. You should see a 200 code and a small size in bytes. - Now request something large: a page with images, a large JSON from your API, or just a big file. Add a time limit so the command doesn't hang forever:
curl -x http://login:pass@host:port -m 30 -s -o NUL -w "%{http_code} %{size_download} %{time_total}" https://address-of-large-response/. - Look at the result. If the large request ended with a timeout error and the download size got stuck at a small number of bytes, this is a characteristic sign of an MTU black hole.
- Repeat the same large request directly, without the proxy or tunnel. If it loads fine directly, you've narrowed the search area down to the path through the tunnel.
- To be sure, repeat the large request through SOCKS5. As of 22.09.2026, for Proxeon proxies the SOCKS5 port equals the HTTP port plus one, so you just need to increase the port number and change the scheme:
curl -x socks5://login:pass@host:port_plus_one -m 30 -s -o NUL -w "%{http_code} %{size_download}" https://address-of-large-response/. If it hangs in both cases, the problem definitely isn't the proxy protocol.
Additional signs of an MTU problem
- An SSH session through a tunnel connects, short commands work, but the output of a long command like
cat large_filegets cut off or freezes. - A file download reaches the same size every time and stops.
- Sites with small pages open, but heavy applications in the browser spin an endless loader.
- In the output of
curl -vyou can see the TLS handshake completed, the response headers received, and then silence.
Check: at this stage you have two results: a small response through the tunnel was received successfully, a large response through the tunnel hung, while the same large response loads fine directly. If that's exactly the picture, move on to Step 2.
Possible problems
All requests fail with an error, including the small ones. That means the tunnel or proxy simply isn't working. Check the address, port, login and password, and whether the host is reachable with a regular ping. MTU has nothing to do with it.
The large request is slow but eventually gets through. Fragmentation may still be working, just with losses and retransmissions. Adjusting MTU will improve speed, but you won't see a hang as such. Keep going with the guide; the result will still be noticeable.
The behavior changes from request to request. This is normal for mobile proxies: modems change IP, and along with it the route through the carrier's network may change. As of 14.11.2026, 8,795 modems changed IP within 24 hours, with a median of 95 unique IPs per modem per day. So check several times in a row and record the results.
Step 2: Measuring the real path MTU with ping and the DF bit
Goal of this stage: to determine the exact packet size that passes through your route without fragmentation. This number will become the basis for all further calculations.
The idea behind the method is simple. We send a ping packet of a given size with the DF bit set. If the packet gets through, we increase the size. If it doesn't, we decrease it. The boundary between "gets through" and "doesn't get through" is the desired path MTU.
How to count the size
The ping utility accepts the payload size, not the total packet size. You need to add the IPv4 header (20 bytes) and the ICMP header (8 bytes), 28 bytes in total. So to test an MTU of 1500, you need to send a ping with a payload of 1472. For an MTU of 1400 the payload will be 1372, and so on.
Windows
- Open the command prompt as administrator. To do this, click Start, type cmd, right-click the result and select "Run as administrator".
- Run an initial check:
ping -f -l 1472 -n 3 destination_address. The -f key sets the DF bit, -l sets the payload size, -n the number of attempts. Use a host on the other side of the tunnel as the address, or any stable public server that responds to ping. - If you see the reply "Packet needs to be fragmented but DF set", then 1500 doesn't get through. Decrease the payload in steps of 50: 1422, 1372, 1322.
- Once the ping starts getting through, go back with steps of 10, then steps of 1, to find the exact boundary.
- Write down the last passing payload size and add 28. That's your path MTU.
Linux
- Open a terminal.
- Run:
ping -M do -s 1472 -c 3 destination_address. The -M do parameter disables fragmentation, -s sets the payload size, -c the number of packets. - If the packet doesn't get through, you'll see a message like "ping: local error: message too long, mtu=XXXX" or simply no replies. In the first case, the system is already telling you the local interface MTU.
- Adjust the size the same way as described for Windows: first in large steps, then in small ones.
- Add 28 to the payload you found and write down the result.
macOS
- Open Terminal from the Utilities folder.
- Run:
ping -D -s 1472 -c 3 destination_address. The -D key sets the DF bit. - The rest of the selection logic is exactly the same as for Linux.
Measuring through a proxy or modem
If you work with a mobile proxy and don't have direct access to the modem, a direct ping with DF through the proxy is impossible, because the proxy operates at the TCP level. In this case there are two paths. First: if the modem or the gateway with the proxy is in your hands, run ping directly from it, and you'll measure the path through the carrier's network. Second: use the tcpdump method from the additional capabilities section to see what MSS comes from the remote side and at what segment size losses begin.
Warning: if ping with the DF bit doesn't get through at any size, even at 100 bytes, then ICMP is completely blocked along the route. This doesn't mean the MTU is large or small, it means this measurement method isn't available to you. Move on to selecting from the table in Step 3 and testing with curl.
Tip: take the measurement several times and at different times. In mobile networks the route can change after an IP change. As of 14.11.2026, more than half of IP changes, namely 51.1%, occurred on a timer, the rest via link or API. If you use timer-based rotation, measure MTU before and after the next address change and take the smaller value.
Check: you have a number written down, for example the path MTU. Ping with a payload one byte below the boundary passes reliably three times in a row, and ping with a payload at the boundary doesn't get through.
Possible problems
Ping gets through at 1472, but large responses still hang. Most likely the bottleneck isn't on the path to the chosen address, but on another segment, for example inside the tunnel to a specific server. Repeat the measurement to a host on the far side of the tunnel.
The boundary fluctuates between runs. Write down the minimum value from all observations and work with that.
Step 3: Calculating a safe MTU and MSS value
Goal of this stage: to turn the measured number into two concrete values: the MTU for the interface and the MSS for clamping on the gateway, accounting for all the headers of your tunnel.
Overhead cheat sheet
These sizes are defined by protocol specifications, so you can use them safely:
- IPv4 header: 20 bytes.
- IPv6 header: 40 bytes.
- TCP header without options: 20 bytes.
- UDP header: 8 bytes.
- PPPoE: 8 bytes, which is why the classic MTU for PPPoE connections is 1492.
- GRE without a key: 24 bytes together with the new IP header.
- Encapsulation for 464XLAT and similar translations: an additional IPv6 header, that is 20 bytes more than IPv4.
Calculation algorithm
- Take the path MTU measured in Step 2. Let's call it P.
- If the measurement was taken outside the tunnel and the traffic will go inside it, subtract the tunnel overhead. For example, for GRE: P minus 24.
- Subtract a margin for unexpected options. A practical margin is 8 bytes: it covers TCP timestamps and other small options that are often included in headers.
- The resulting number is the MTU for the interface inside the tunnel.
- For MSS, subtract another 40 bytes from the MTU (20 for IPv4 and 20 for TCP). If IPv6 travels through the tunnel, subtract 60 (40 for IPv6 and 20 for TCP).
Calculation example
Suppose ping with DF passed at a payload of 1444 and failed at 1445. Then the path MTU is 1444 plus 28, that is 1472. The traffic goes through GRE, subtract 24, and you get 1448. A margin of 8 bytes gives an MTU of 1440. The MSS for IPv4 is 1440 minus 40, that is 1400. If you're unsure about the exact composition of the tunnel, round down to a nice number: MTU 1400 and MSS 1360 will work almost anywhere.
If you couldn't measure
When ICMP is blocked and ping with DF gives no response, select the value from the top down: start with MTU 1400, test a large response with curl, and if it fails, go down to 1360, then to 1300. Test the result each time. Stop at the first value at which large responses load reliably, and don't go lower without need: an MTU that's too small increases the number of packets and reduces speed.
Tip: for MSS you don't have to aim for perfect precision. A margin of a few dozen bytes costs you a fraction of a percent of bandwidth, while an error of one byte in the wrong direction brings back all the hangs. Better slightly smaller than slightly larger.
Check: you have two numbers on paper or in your notes: the MTU for the interface and the MSS for the gateway. The MSS is exactly 40 less than the MTU (or 60 for IPv6).
Step 4: Applying MTU on the device interface
Goal of this stage: to make the operating system stop sending packets larger than the calculated MTU. This method fixes the problem for one device and doesn't require access to the gateway.
Windows
- Open the command prompt as administrator.
- List the interfaces and their current MTU:
netsh interface ipv4 show subinterfaces. The table will have columns MTU, MediaSenseState, Bytes In, Bytes Out and Interface. Find the interface through which traffic goes into the tunnel, for example "Ethernet" or "Wi-Fi" or the name of the tunnel adapter. - Set the new value:
netsh interface ipv4 set subinterface "Ethernet" mtu=1400 store=persistent. Replace Ethernet with the exact name from the table, and 1400 with your calculated number. The store=persistent parameter saves the value after a reboot. - If you use IPv6, repeat the same for it:
netsh interface ipv6 set subinterface "Ethernet" mtu=1400 store=persistent. - Run the command from point 2 again and make sure the MTU column shows the new number.
Linux (temporary, until reboot)
- Find the interface name:
ip link show. The output will have lines like "2: eth0: ... mtu 1500". Note the name, for example eth0, wlan0, ppp0 or gre1. - Apply the MTU:
sudo ip link set dev eth0 mtu 1400. - Check:
ip link show eth0. The line should show "mtu 1400".
Linux (permanent)
The method depends on what manages the network on your system.
- NetworkManager:
sudo nmcli connection modify "connection_name" 802-3-ethernet.mtu 1400, thensudo nmcli connection up "connection_name". The connection name can be seen innmcli connection show. - Netplan (Ubuntu Server): in a file from the /etc/netplan directory, add the line mtu: 1400 inside the description of the desired interface, then run
sudo netplan apply. - systemd-networkd: in the [Link] section of the .network file, add MTUBytes=1400 and restart the service.
macOS
- Find the interface name:
networksetup -listallhardwareports. For Wi-Fi it's usually en0, for a wired adapter en1 or another. - Set the MTU:
sudo networksetup -setMTU en0 1400. - Check:
networksetup -getMTU en0.
Home router with PPPoE
If your ISP uses PPPoE, log in to the router's web interface, find the WAN or internet connection settings section and the MTU field. For PPPoE the correct value is 1492. If there's also a tunnel behind the router, use the value from your calculation. After saving, the router usually reconnects to the ISP, which takes a few seconds.
Warning: don't set an MTU below 1280 on interfaces with IPv6. The IPv6 specification requires every channel to pass packets of at least that size, and a smaller value will cause some connections to fail.
Check: the interface display command shows the new MTU. The large request through curl from Step 1 now loads fully, with the full response size in the size_download field and a reasonable time_total.
Possible problems
Windows says "The filename, directory name, or volume label syntax is incorrect". The interface name is inaccurate. Copy it from the output of the show subinterfaces command literally, including spaces, and be sure to put it in quotes.
Linux says "Invalid argument". For some interface types, such as tunnel interfaces, the MTU is limited by the value of the parent interface. Decrease the number or first check the MTU of the physical interface.
The value reset after a reboot. You used a temporary command. Go back to the section on permanent configuration.
Step 5: Setting up MSS clamping on the gateway
Goal of this stage: to fix the problem for all devices behind the gateway at once, without touching each one individually. This is the most reliable method, because it works even with remote servers that don't know about your tunnel.
The principle: the gateway intercepts every TCP packet with the SYN flag passing through it and reduces the announced MSS to the required value. The remote server sees a small MSS and sends segments that are guaranteed to fit into the tunnel. ICMP isn't needed at all in this case, so the black hole stops mattering.
Linux with iptables
- Connect to the gateway via SSH.
- Add a rule with automatic selection based on the route MTU:
sudo iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu. The mangle table is responsible for modifying packets, the FORWARD chain for transit traffic, and --clamp-mss-to-pmtu tells it to take the outgoing interface MTU and subtract 40. - If automatic selection doesn't suit you, for example the tunnel interface itself has an MTU of 1500 and doesn't know about the real limitation, set the value explicitly:
sudo iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360. Substitute your MSS from Step 3. - If the gateway itself initiates connections, add the same rule to the OUTPUT chain, replacing FORWARD with OUTPUT.
- Check the rule:
sudo iptables -t mangle -L FORWARD -v -n. The output should have a line with TCPMSS and a packet counter that grows with new connections. - Save the rules so they survive a reboot:
sudo apt install iptables-persistent, thensudo netfilter-persistent save.
Linux with nftables
- Make sure there's a table and a forward chain. If not, create them:
sudo nft add table ip mangleandsudo nft add chain ip mangle forward { type filter hook forward priority mangle; }. - Add a rule:
sudo nft add rule ip mangle forward tcp flags syn tcp option maxseg size set rt mtu. The rt mtu expression substitutes the route MTU automatically. - For a fixed value, replace rt mtu with a number:
sudo nft add rule ip mangle forward tcp flags syn tcp option maxseg size set 1360. - Check:
sudo nft list ruleset. - Save:
sudo nft list ruleset > /etc/nftables.confand enable the nftables service at boot.
MikroTik RouterOS
- Open the terminal in WinBox or connect via SSH.
- Run:
/ip firewall mangle add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=clamp-to-pmtu passthrough=yes comment="mss clamp". - If you need a fixed value, replace clamp-to-pmtu with a number, for example new-mss=1360, and add the condition tcp-mss=1361-65535 so you don't increase the MSS for those whose value is already smaller.
- Move the rule to the top of the mangle chain if you have other rules that might intercept the SYN earlier.
- Check the counters in the IP, Firewall, Mangle section: the Packets column should grow.
Home routers
On many firmwares MSS clamping is enabled automatically along with PPPoE or a tunnel connection. Look for an option named something like "Clamp MSS", "MSS Clamping" or "TCP MSS" in the WAN section or the firewall section. In OpenWrt it's in the firewall zone settings for the WAN interface and is enabled by default.
Tip: don't clamp only incoming or only outgoing SYN. A rule in the FORWARD chain without specifying a direction handles both, and that's enough. Restricting the direction is worth it only in complex setups with several tunnels of different sizes.
Check: the rule's counter grows when new connections are opened. A device behind the gateway with an interface MTU of 1500 loads large responses through the tunnel without hangs. If you have tcpdump, you can see the reduced MSS value in the SYN-ACK from the remote server.
Possible problems
The rule is added but the counter doesn't grow. The traffic isn't passing through the FORWARD chain. If the gateway is also a client, use OUTPUT. If the traffic terminates on the gateway itself, for example a proxy server listening on it, clamp is needed in the INPUT chain for incoming SYN and OUTPUT for outgoing.
It got slower after enabling. You chose too small an MSS. Raise the value closer to the calculated one, leaving a margin of a few dozen bytes.
Step 6: Locking in the result and preparing a rollback
Goal of this stage: to make sure the settings survive a reboot and to prepare a plan in case something goes wrong.
- Reboot the device or gateway where the settings were changed. This is the most honest way to check that they're saved.
- After boot, run the MTU display command from Step 4 and the rule display command from Step 5.
- Repeat the control curl of the large response through the tunnel. Write down the size and time.
- Save the original values, the new values and the rollback commands in your notes.
Rollback commands
- Windows:
netsh interface ipv4 set subinterface "Ethernet" mtu=1500 store=persistent - Linux:
sudo ip link set dev eth0 mtu 1500and removing the mtu line from the network configuration. - iptables:
sudo iptables -t mangle -D FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu, then saving again. - MikroTik: in the Mangle section, disable or delete the rule with the mss clamp comment.
Warning: don't delete the rollback from your notes, even if everything has been working for months. A change of ISP, carrier or router firmware can change the picture, and you'll need to quickly return to the original state to measure again.
Check: after the reboot all values are in place, the large response through the tunnel loads, and you have a list of commands that return everything to how it was.
Verifying the result
Go through the checklist. Every point must be met without caveats.
Checklist
- A small request through the tunnel or proxy returns a 200 code.
- A large request through the tunnel returns a 200 code and the full response size.
- The load time of the large response is comparable to loading it directly, adjusted for channel speed.
- SSH through the tunnel shows long output without interruptions.
- The interface MTU or MSS clamp rule survive a reboot.
- The check is repeated after an IP change if you use rotation on mobile proxies.
How to test repeatability
- Run the large request ten times in a row in a loop. On Linux and macOS:
for i in 1 2 3 4 5 6 7 8 9 10; do curl -x http://login:pass@host:port -m 30 -s -o /dev/null -w "%{http_code} %{size_download}" https://address-of-large-response/; echo; done. On Windows you can simply repeat the command manually. - All ten lines should contain a 200 code and the same size.
- If even one line shows a timeout, go back to Step 3 and decrease the value by 20 bytes.
Indicators of success
There's one main indicator: there's no longer any difference in behavior between small and large responses. Additionally, you may notice that download speed has become more stable and that timeouts on reading the response body have disappeared from application logs.
Common mistakes and their solutions
Mistake 1: the hang remains even though MTU is reduced on the client
Cause: the problem is with packets sent by the remote server, not your client. Your MTU only affects outgoing packets, and the server still sends segments according to the announced MSS. Solution: reducing MTU on the interface automatically reduces the MSS in your client's SYN, but only if the right interface is chosen. Check that you changed the exact interface through which traffic goes into the tunnel. If traffic goes through a gateway, set up MSS clamping on it.
Mistake 2: MSS clamping is set up, but some sites still hang
Cause: the traffic goes over UDP, for example through QUIC in the browser, and clamping only works for TCP. Solution: reduce the MTU on the client interface to limit UDP packets as well, or temporarily disable QUIC in the browser for testing.
Mistake 3: too small a value and a drop in speed
Cause: you overdid it and set the MTU far below the real one. Each packet carries more headers relative to payload data, CPU load and the number of packets grow. Solution: go back to measuring and raise the value to the calculated one with a small margin.
Mistake 4: the value is selected, but a day later everything broke
Cause: the route changed. In mobile networks this is a common story: after an IP change, traffic may go through a different carrier node with different limitations. Solution: measure MTU several times during the day and take the minimum. For proxies with timer-based rotation, it's convenient to check right after the next address change.
Mistake 5: changed MTU over IPv4, but traffic goes over IPv6
Cause: modern systems prefer IPv6 if it's available, and you only configured the IPv4 family. Solution: in Windows repeat the command for interface ipv6, in iptables add a similar rule via ip6tables, in nftables use the inet family instead of ip.
Mistake 6: the clamp rule is placed after a rule that accepts traffic earlier
Cause: in the mangle chain the packet matches an earlier rule with an action that interrupts processing, and it never reaches the clamp. Solution: move the clamp rule to the top of the chain. In iptables use -I instead of -A, in MikroTik drag the rule up.
Mistake 7: ping gets through at any size, but large responses hang
Cause: you're pinging a host before the bottleneck, not after it. For example, the tunnel gateway itself responds to ping, but the limitation is further along. Solution: ping a host on the far side, ideally the very server from which responses hang, if it responds to ICMP.
Mistake 8: confused MTU and MSS
Cause: you put the MTU value into the clamp rule instead of the MSS. The segments came out 40 bytes larger than allowed, and the hangs returned. Solution: check that the rule has a number 40 less than the MTU for IPv4 and 60 less for IPv6.
Additional capabilities and advanced debugging
Looking at MSS in real packets with tcpdump
If you want to see what's actually happening, capture SYN packets on the gateway: sudo tcpdump -i eth0 -n 'tcp[tcpflags] & tcp-syn != 0'. Each line will have an mss field with a number. Compare the value in the SYN from the client and in the SYN-ACK from the server before and after enabling the clamp. After enabling, both numbers shouldn't exceed your calculated value.
Enabling automatic MTU discovery without ICMP in Linux
The Linux kernel can detect a black hole on its own based on repeated losses. To do this, enable: sudo sysctl -w net.ipv4.tcp_mtu_probing=1. To keep it after a reboot, add the line net.ipv4.tcp_mtu_probing=1 to the /etc/sysctl.conf file. This doesn't replace clamping, but it protects connections initiated from the server itself.
Different MSS for different directions
If you have several tunnels with different limitations, don't set one small value for everything. In iptables, add the -o parameter with the outgoing interface name to each rule and specify its own MSS value for each. In MikroTik, similarly, use out-interface.
Advmss in the routing table
Instead of a firewall rule, you can set the MSS directly in the route: sudo ip route change default via gateway_address dev eth0 advmss 1360. This only affects connections initiated from the given machine, but it doesn't require iptables.
Diagnostics on the proxy infrastructure side
When working with mobile proxies, remember that different carriers and even different base stations provide a different path. As of 14.11.2026, within 24 hours, modems on the Beeline carrier showed 106,782 unique IPs, MegaFon 65,541, Tele2 56,412, MTS 39,111 and Yota 28,012. Such a variety of addresses means a variety of routes, so a universal value with a margin is more reliable than one perfectly tuned to a single measurement. Proxeon's infrastructure on the modem side delivers traffic over TCP via HTTP and SOCKS5, and you control the packet size limits on the client side using the methods from this guide.
Tip: if you're writing a scraper, add a check of the received response body size against the Content-Length header. A mismatch in the absence of a network error almost always indicates an MTU problem and will help you notice it before your users do.
FAQ: answers to common questions
Can I just set MTU 1400 everywhere and skip measuring?
You can, and in many cases it will work. But without measuring, you won't know whether you lowered the value too much, and you won't understand why even 1400 doesn't work through a specific tunnel. Measuring takes minutes and gives you confidence.
Why does ping get through but sites hang if it's about packet size?
A regular ping sends small packets that fit into any reasonable channel. The problem only shows up with full-size packets that arise when transferring large data. That's why you need ping with the DF bit and a large payload size for diagnostics.
What's better: reducing MTU or setting up MSS clamping?
For a single device it's simpler to reduce MTU. For a network with several devices or with remote servers you don't control, clamping on the gateway is more reliable. The ideal option: clamping on the gateway plus an accurate MTU on the tunnel interface.
Do I need to reboot the computer after changing MTU?
In Windows and Linux the change applies immediately to new connections. Already-open connections will keep using the old value, so restart the browser or application. A reboot is only needed to verify that the setting survives.
How can I tell that ICMP is blocked along the route?
If ping with DF doesn't get through even with the minimum payload, but regular access to the host works, ICMP is being blocked. You may also notice that ping with DF at a large size doesn't return a message about needing fragmentation and simply stays silent.
Does MTU affect UDP and DNS?
Yes. Large DNS responses, for example with DNSSEC, may not get through a narrow tunnel. MSS clamping won't help here, since this isn't TCP. Solution: reduce the interface MTU or enable a limit on UDP response size in the resolver with a fallback to TCP.
Can I set an MTU larger than 1500?
Only if the entire path supports jumbo frames. This isn't the case in home and mobile networks, and for tunnels such a setting is pointless. This guide is about situations where you need to decrease, not increase.
Why does the problem only appear through a proxy, while everything works directly?
The direct route to the server goes through channels with a full MTU of 1500. The route through a proxy adds a segment through the carrier's network or a tunnel with additional headers, where full-size packets no longer fit. At the same time, ICMP from the bottleneck may not reach the server, and it won't learn about the problem.
Do I need to change MTU on the server I'm downloading from?
As a rule, no, and most often you don't have access to it. A properly configured MSS clamp on your side will tell the server the required size at the connection establishment stage, and the server will adjust on its own.
What should I do if after all the settings the hangs appear rarely and randomly?
This is a sign of a fluctuating route. Do a series of measurements at different times, take the minimum value and add another margin of twenty bytes. For mobile proxies, additionally check the behavior right after an IP change.
Conclusion
You've gone the whole way: from mysterious hangs of large responses to a clear and reproducible configuration. Now you can distinguish an MTU problem from all others by the characteristic sign "small works, large doesn't", measure the real packet size on the route with ping and the DF bit, calculate MTU and MSS accounting for tunnel headers, apply the value on Windows, Linux, macOS and a router, and set up MSS clamping on a gateway that protects the whole network at once and doesn't depend on blocked ICMP.
What to do next
- Add a large-response check to your regular tests so you catch route degradation in advance.
- Record the values you found and the rollback commands in your network documentation.
- If you work with mobile proxies, repeat the measurement after a change of carrier or modem region.
Where to grow
The next level is understanding TCP at the traffic-capture level. Master tcpdump and handshake analysis, learn how the TCP timestamps and window scaling options work, and look at the behavior of QUIC, which solves MTU problems with its own means. With this foundation, you'll be able to diagnose not only MTU but most of the network-layer oddities that once seemed inexplicable. Happy configuring and stable connections.