<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.jandzsogyorgy.hu/index.php?action=history&amp;feed=atom&amp;title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt</id>
	<title>Solving VPN-Related Network Timeouts on OpenWrt - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.jandzsogyorgy.hu/index.php?action=history&amp;feed=atom&amp;title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt"/>
	<link rel="alternate" type="text/html" href="https://wiki.jandzsogyorgy.hu/index.php?title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt&amp;action=history"/>
	<updated>2026-05-05T15:51:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.6</generator>
	<entry>
		<id>https://wiki.jandzsogyorgy.hu/index.php?title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt&amp;diff=330&amp;oldid=prev</id>
		<title>Gyurci08 at 20:19, 2 September 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.jandzsogyorgy.hu/index.php?title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt&amp;diff=330&amp;oldid=prev"/>
		<updated>2025-09-02T20:19:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:19, 2 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Networking]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Networking]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;OpenWrt&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;OpenWRT&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:VPN]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:VPN]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Troubleshooting]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Troubleshooting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gyurci08</name></author>
	</entry>
	<entry>
		<id>https://wiki.jandzsogyorgy.hu/index.php?title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt&amp;diff=329&amp;oldid=prev</id>
		<title>Gyurci08: Created page with &quot;== Solving VPN-Related Network Timeouts on OpenWrt == This guide documents the diagnosis and resolution of a common network issue: intermittent connection timeouts for specific services when traffic is routed through a VPN tunnel (e.g., WireGuard, ZeroTier) on an OpenWrt router. The root cause is a Path MTU Discovery (PMTUD) black hole, and the solution is to enable TCP MSS Clamping in the firewall.  === 1. The Problem: Connection Timeouts and Stalls === The primary symp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.jandzsogyorgy.hu/index.php?title=Solving_VPN-Related_Network_Timeouts_on_OpenWrt&amp;diff=329&amp;oldid=prev"/>
		<updated>2025-09-02T20:17:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Solving VPN-Related Network Timeouts on OpenWrt == This guide documents the diagnosis and resolution of a common network issue: intermittent connection timeouts for specific services when traffic is routed through a VPN tunnel (e.g., WireGuard, ZeroTier) on an OpenWrt router. The root cause is a Path MTU Discovery (PMTUD) black hole, and the solution is to enable TCP MSS Clamping in the firewall.  === 1. The Problem: Connection Timeouts and Stalls === The primary symp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Solving VPN-Related Network Timeouts on OpenWrt ==&lt;br /&gt;
This guide documents the diagnosis and resolution of a common network issue: intermittent connection timeouts for specific services when traffic is routed through a VPN tunnel (e.g., WireGuard, ZeroTier) on an OpenWrt router. The root cause is a Path MTU Discovery (PMTUD) black hole, and the solution is to enable TCP MSS Clamping in the firewall.&lt;br /&gt;
&lt;br /&gt;
=== 1. The Problem: Connection Timeouts and Stalls ===&lt;br /&gt;
The primary symptom is that certain TCP connections hang and eventually time out, while others work perfectly.&lt;br /&gt;
&lt;br /&gt;
*   &amp;#039;&amp;#039;&amp;#039;Failing Services:&amp;#039;&amp;#039;&amp;#039; Connections to complex websites or APIs that require a larger packet size for their TLS handshake.&lt;br /&gt;
*   &amp;#039;&amp;#039;&amp;#039;Working Services:&amp;#039;&amp;#039;&amp;#039; Connections to simple websites that transfer very little data (e.g., `ifconfig.me`) and standard ICMP (ping) requests.&lt;br /&gt;
&lt;br /&gt;
This issue arises because VPN encapsulation adds overhead to packets. If a router on the internet path has a smaller MTU (Maximum Transmission Unit) than the encapsulated packet, and it is misconfigured to silently drop oversized packets instead of sending a proper ICMP &amp;quot;Fragmentation Needed&amp;quot; message, a PMTUD black hole is created. The connection stalls because the client&amp;#039;s server never learns that it needs to send smaller packets.&lt;br /&gt;
&lt;br /&gt;
=== 2. The Diagnostic Process ===&lt;br /&gt;
A systematic approach using standard network tools can definitively identify a PMTUD black hole.&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Confirm the Scope ====&lt;br /&gt;
The issue was reproduced by running `curl` from a client whose traffic was routed through the VPN tunnel. Simple, low-data sites worked, while complex, high-data sites failed. This is a classic indicator of an MTU-related problem.&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Packet Capture with `tcpdump` ====&lt;br /&gt;
The definitive proof came from capturing the raw packet flow with `tcpdump` on the router. The capture showed a consistent pattern for failing connections:&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Successful Handshake:&amp;#039;&amp;#039;&amp;#039; The initial TCP three-way handshake (`SYN`, `SYN/ACK`, `ACK`) completed successfully.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;TLS Negotiation Stall:&amp;#039;&amp;#039;&amp;#039; The connection stalled immediately after the handshake when larger packets (like a TLS certificate) were expected.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Selective Acknowledgment (SACK):&amp;#039;&amp;#039;&amp;#039; The client&amp;#039;s kernel sent `SACK` packets. This was the &amp;quot;smoking gun,&amp;quot; as it proved the client was receiving &amp;#039;&amp;#039;some&amp;#039;&amp;#039; data but was acknowledging that other segments were missing.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Timeout:&amp;#039;&amp;#039;&amp;#039; The connection eventually hung and was closed by the client.&lt;br /&gt;
&lt;br /&gt;
=== 3. The Solution: Enable TCP MSS Clamping in OpenWrt ===&lt;br /&gt;
While manually setting the MTU on the VPN interface (e.g., to `1420` for WireGuard) is a necessary first step, it does not always solve the problem if the internet path has a non-standard MTU. The most robust solution is to enable TCP MSS Clamping. This instructs the router to automatically resize TCP segments to prevent fragmentation.&lt;br /&gt;
&lt;br /&gt;
On OpenWrt, this is accomplished easily through the LuCI web interface or by editing `/etc/config/firewall`. The key is to add the `mtu_fix` option to the firewall zone handling VPN traffic.&lt;br /&gt;
&lt;br /&gt;
==== Corrected Firewall Zone Configuration ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# In /etc/config/firewall&lt;br /&gt;
&lt;br /&gt;
config zone&lt;br /&gt;
        option name &amp;#039;vpn_zone&amp;#039; #&amp;lt;-- Your VPN zone name&lt;br /&gt;
        # ... other options ...&lt;br /&gt;
        list network &amp;#039;your_vpn_interface&amp;#039; #&amp;lt;-- e.g., &amp;#039;wg_jgy_internal&amp;#039;&lt;br /&gt;
        option mtu_fix &amp;#039;1&amp;#039; # &amp;lt;-- This line is the fix&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This setting is a best practice and should be enabled for &amp;#039;&amp;#039;&amp;#039;all VPN-related firewall zones&amp;#039;&amp;#039;&amp;#039; to ensure reliable network connectivity across any internet path.&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;br /&gt;
[[Category:OpenWrt]]&lt;br /&gt;
[[Category:VPN]]&lt;br /&gt;
[[Category:Troubleshooting]]&lt;/div&gt;</summary>
		<author><name>Gyurci08</name></author>
	</entry>
</feed>