# Change outgoing TTL

**URL:** <https://forum.gl-inet.com/t/change-outgoing-ttl/2096>\
**Category:** Router\
**Created:** [May 1, 2017, 5:02am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096 "2017-05-01T05:02:03Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 16, 2023, 3:05am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/103 "2023-06-16T03:05:54Z")

</div>

> [@vpntravel](#):
>
> That’s core of my issue. If LTE and VPN are on same device (such as Puli), I get throttled.

Seems a problem of mtu. Can you check the vpn mtu lower?

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 16, 2023, 3:27am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/104 "2023-06-16T03:27:43Z")

</div>

I have it set at 1280. What number do you suggest? Also, should this be set on 4gLTE config or WireGuard VPN Client settings?? Or both?

Edit: tried 1080, 880 for MTU - neither helped.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 16, 2023, 5:03am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/105 "2023-06-16T05:03:54Z")

</div>

4G should set as 1428

Wireguard 1380

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 16, 2023, 5:38am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/106 "2023-06-16T05:38:57Z")

</div>

Just tried with these MTUs, didn’t work.

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 16, 2023, 4:05pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/107 "2023-06-16T16:05:39Z")

</div>

@ericsmith @alzhao

Here’s another data point: I have Inseego M2000 with TTL mod and it has exact same issue as GL-Inet Puli. When I configure OpenVPN client on M2000 device, speed crawls to 200KB/s. Inseego also runs OpeWRT. If I use M2000 w/out VPN and use that as tethering device and configure VPN on Gl-Inet Beryl or Puli, there’s no throttling.

Within the OpenWRT system, there’s some leak when 4g/5g and VPN are on ‘same’ device, T-Mobile targets and throttles.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 19, 2023, 3:14am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/108 "2023-06-19T03:14:02Z")

</div>

> [@vpntravel](#):
>
> Within the OpenWRT system, there’s some leak when 4g/5g and VPN are on ‘same’ device, T-Mobile targets and throttles.

I am more than sure it is mtu problem. But I cannot find a way to debug.

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 19, 2023, 9:26pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/109 "2023-06-19T21:26:51Z")

</div>

I’ve tried all settings from 800 to 1300 at 100 increments for MTU in 4G and Wireguard Client VPN settings. I’ve found no improvment. It’s stuck at 200kb/s.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 20, 2023, 6:10am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/110 "2023-06-20T06:10:03Z")

</div>

What were the mtu settings you use for vpn and 4G at the same time?

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 20, 2023, 3:40pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/111 "2023-06-20T15:40:02Z")

</div>

I have some success 🙂

I tried 1000 MTU on 4G and 800 MTU on WireGuard and started getting 8mbps up and 7mbps down. I am very pleased with this result. Earlier, I was trying setting both MTU to 800, 900, 1000 etc and it wasn’t working.

Thanks to your intuition, it was a MTU problem. Now I just need to calibrate the MTU to best speeds possible. I will have to further play with numbers, but I can perfectly live with these speeds for my use case. Thank you so much. Seems Puli likes much smaller MTU numbers with T-mobile and gap between 4G MTU and Witeguard MTU has to be large.

Any idea how to setup MTU for OpenVPN?

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 20, 2023, 3:58pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/112 "2023-06-20T15:58:14Z")

</div>

Carrier mtu should be 1428 or lower.

The gap between 4G and vpn mtu should be 48 and higher. So pls try 1428 and 1380. If not working adjust both slightly lower and bigger gap.

Pls also note vpn client should use lower mtu than vpn server, if you know the value.

OpenVPN should be able to set mtu in the vpn dashboard if you use firmware 4.x.

---

<div class="post-metadata">

**Author:** ![vpntravel](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/v/8797f3/32.png) [@vpntravel](https://forum.gl-inet.com/u/vpntravel)\
**Post date:** [June 24, 2023, 3:12pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/113 "2023-06-24T15:12:34Z")

</div>

> [@alzhao](#):
>
> and vpn mtu should be 48 and higher. So pls try 1428 and 1380. If not working adjust both slightly lower and bigger gap.
> 
> Pls also note vpn client should use

I think I may have set MTU setting on VPN servers really low (1280 - I don’t remember). That maybe why i am having issues with numbers you are suggesting (1428 and 1380) on client side and (1100 and 1000) are working. I will be traveling back to where the VPN server is next month and change the MTU value. I will set VPN servers to 1500 MTU next month and then I will try 1428 and 1380. Regardless, I’m good for now so thank you so much. Can’t wait for Puli AX product. Keep up the good work!

---

<div class="post-metadata">

**Author:** ![paps-c](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/p/e68b1a/32.png) [@paps-c](https://forum.gl-inet.com/u/paps-c)\
**Post date:** [June 28, 2023, 12:47am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/114 "2023-06-28T00:47:43Z")

</div>

Hello everyone, hope everybody is doing ok, I was thinking of creating a new post, I’d continue with this thread since it is also related, I have both MT1300 and AR750S, on the 3.216 firmware I was able to just copy/paste it under custom firewall rules but on 4.3.2 B1 firmware the interface is totally different, any idea on how to do it? thanks!. This is my first posr so take it easy on me 🙂, still learning openwrt.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [June 28, 2023, 7:29am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/115 "2023-06-28T07:29:41Z")

</div>

OpenWrt 22.03 changed a lot. To set up ttl in OpenWrt 22.03, pls use the following command

```auto
mkdir -p /usr/share/nftables.d/chain-pre/mangle_postrouting/
echo "ip ttl set 65" > /usr/share/nftables.d/chain-pre/mangle_postrouting/01-set-tt
l.nft
fw4 reload

```

The above command set ttl 65 to all interfaces

---

<div class="post-metadata">

**Author:** ![josevega22](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@josevega22](https://forum.gl-inet.com/u/josevega22)\
**Post date:** [June 29, 2023, 4:10pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/116 "2023-06-29T16:10:09Z")

</div>

buenos dias tengo un rauter AR300M16 quiero compartir internet ilimitado desde mi moden 3hs pegue es la linea iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65 , pero sigue consumiendo datos de compartir, me pueden ayudar por favor

---

<div class="post-metadata">

**Author:** ![bOcy](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/b/4bbf92/32.png) [@bOcy](https://forum.gl-inet.com/u/bOcy)\
**Post date:** [July 31, 2023, 1:03am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/118 "2023-07-31T01:03:36Z")

</div>

Want to inform TTL 65 doesn’t help get hotspot internet on ar300m and mt300v2 version 4 beta firmware (firewall fw4)

 ![Screenshot_2023-07-31-08-59-05-299_com.android.chrome](https://forum-static.gl-inet.com/original/2X/9/9a53b3db618f9bb92788dd5ff4255bdd354fb536.jpeg)  
even if I set TTL 65 in modem manual configuration and also followed the new commands provided by alzhao

Checked mt3000 which has firewall fw3 works fine

---

<div class="post-metadata">

**Author:** ![janosek](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@janosek](https://forum.gl-inet.com/u/janosek)\
**Post date:** [August 19, 2023, 2:57am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/119 "2023-08-19T02:57:22Z")

</div>

I signed up to thank you for this. Excellent work!

---

<div class="post-metadata">

**Author:** ![ftt1211](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@ftt1211](https://forum.gl-inet.com/u/ftt1211)\
**Post date:** [December 24, 2023, 5:40pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/120 "2023-12-24T17:40:12Z")

</div>

When I put this this command “iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65” into firewall - custom rules, it doesn’t work. I ping the router and my ttl still shows as 64. I have the Beryl AX running firmware 4.5.0 beta right now, which is based on openwrt 21.02.

Any idea what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![xize11](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/xize11/32/5340_2.png) [@xize11](https://forum.gl-inet.com/u/xize11)\
**Post date:** [December 24, 2023, 10:41pm UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/121 "2023-12-24T22:41:06Z")

</div>

I believe the custom rules are firewall4, only for nftables.

But if I’m correct in the gl firmware they already added a rule for firewall.user put it in there, its located in /etc/firewall.user, though i find the [documentation](https://openwrt.org/docs/guide-user/firewall/firewall_configuration#command-line_instructions) poorly explained about this part, but i believe this file still would work with iptables, so my guess is: please try it 🙂

If not you need this snippet in your firewall config:

```auto
config include
	option path '/etc/firewall.user'
	option reload '1'

```

^ you may need one extra option telling its not compatible with fw4 or something i believe, perhaps my link to the documentation shows it.

---

<div class="post-metadata">

**Author:** ![ikun](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/i/f07891/32.png) [@ikun](https://forum.gl-inet.com/u/ikun)\
**Post date:** [December 25, 2023, 1:32am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/122 "2023-12-25T01:32:30Z")

</div>

> [@ftt1211](#):
>
> “iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65”

hi,  
Please install two plug-ins iptables-mod-conntrack-extra and iptables-mod-ipopt.

 ![image](https://forum-static.gl-inet.com/original/2X/e/ecaa449d41b2aab625aa9094d3da72c8d2d15737.png)  
 ![image](https://forum-static.gl-inet.com/original/2X/a/ad18e46eb8f18337bf8425b9747edb885c9ed8fd.png)

---

<div class="post-metadata">

**Author:** ![ftt1211](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@ftt1211](https://forum.gl-inet.com/u/ftt1211)\
**Post date:** [December 25, 2023, 1:59am UTC](https://forum.gl-inet.com/t/change-outgoing-ttl/2096/123 "2023-12-25T01:59:31Z")

</div>

Thank you. Installing those two plugins allowed that firewall custom rule to work on changing my TTL to 65. However, looks like connecting my computer to my Beryl AX with this TTL change, connected to my phone’s T-Mobile hotspot, does not seem to bypass the speed throttling. Anyone else have any thoughts on how to bypass T-mobile’s hotspot speed throttling with the Beryl AX?

[Previous page](https://forum.gl-inet.com/t/change-outgoing-ttl/2096.md?page=5)

[Next page](https://forum.gl-inet.com/t/change-outgoing-ttl/2096.md?page=7)
