Messing up with TTL using different variations... still getting throttled and frustrated

Topics addressing TTL settings for Throttling, Tethering and Hotspot Usage
Forum rules
Use the SEARCH function for related topics PRIOR to posting a new topic on the same subject.
Post Reply
hydrocynus
Posts: 28
Joined: Sat Jan 15, 2022 11:42 am
Has thanked: 0
Been thanked: 0

Messing up with TTL using different variations... still getting throttled and frustrated

Post by hydrocynus »

Hello all, I have been visiting this forums and others before I decided to take the plunge and post here.
I have several options which include GLiNet router with openWRT (LUCI) or mini PC running currently windows 10 Pro. Either devices can broadcast the signal using a wifi antenna (omni 25dbi). These would be placed outside in a NEMA box powered by solar as my phone (Moto E6) gets good signal outside (25-50mbps vs. 5mbps inside the house (which is a subterranean house btw)). The provider is visible with 5mbps capped.
What I am running now is the phone tethered to the GLiNet router with the TTL set for various TTL numbers (e.g. 65, but I read that 66,65,64, 117, 127, 128 are also possible options). I obviously do not understand much the syntax posted on various forums as some pertain to LTE routers and others when the phone is tethered to a regular router with openwrt (my case). In the syntax below, I also see usb0 in lieu of wwan0 (which I think pertains to my case... I tried that substitution to the syntax below).

I have used the following on the router's firewall custom rules settings:

#start TTL rules
iptables -t mangle -I POSTROUTING -j TTL --ttl-set 64
iptables -t mangle -I PREROUTING -j TTL --ttl-set 64
ip6tables -t mangle -A POSTROUTING -o wwan0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i wwan0 -j HL --hl-set 65
#end TTL rules

I also tried
#ipv6ttlfix
ip6tables -t mangle -I POSTROUTING -j HL --hl-set 64
ip6tables -t mangle -I PREROUTING -j HL --hl-set 64
#startTTL
iptables -t mangle -I POSTROUTING -j TTL --ttl-set 64
iptables -t mangle -I PREROUTING -j TTL --ttl-set 64
#endTTL

I also tried
iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING 1 -j TTL --ttl-set 65
ip6tables -t mangle -I POSTROUTING 1 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING 1 -j HL --hl-set 65

Because I was unsuccessful, I then tried the miniPC route. So, I tried to hide tethering using the paid version of PDAnet+ on both the phone and PC. The weird thing is that PDAnet on the PC is seing at the USB port (using the about PDAnet option and running the test), that the upload and download are what I measure on the phone (ie. speeds above 40mbps). However, running Ookla speedtest on the PC shows thethered speeds at 5mbps.

I then tried to change the default TTL on the PC using the Regedit and creating a DefaultTTL registry and entering the decimal TTL. I tried several TTLs mentioned above with no luck.

I also pinged my phone using the emulator: ping 8.8.8.8 and I get 114 for TTL. So, I tried TTL of 115 on the PC... without any success. Pinging on the PC using ping 8.8.8.8 gives a TTL of 113 (114-1, which is normal).

Thanks a lot of helping out and get it to work (a wiki showing what those syntaxes above mean would help tremendously as I hate pasting something I do not understand).

Post scriptum: once this is figured out, since I am going to use a bridge to redistribute the signal from the outside of the house router/PC, do I need to also configure these routers in a certain way (TTL is reduced by 1 each time) or I just need to setup the bridge normally?
User avatar
JimHelms
Site Admin
Posts: 1361
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 192 times
Contact:

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by JimHelms »

The rules below assumes the USB interface is assigned usb0 (which is common for tethering).

The rules also cover use of an internal modem where the WAN1 interface is assigned wwan0.

Adjust the ttl-set # to your desired TTL

Code: Select all

#startTTL
iptables -t mangle -I POSTROUTING -o wwan0 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i wwan0 -j TTL --ttl-set 65
iptables -t mangle -I POSTROUTING -o usb0 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i usb0 -j TTL --ttl-set 65
#endTTL

Code: Select all

#startTTL
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o wwan0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i wwan0 -j HL --hl-set 65
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o usb0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i usb0 -j HL --hl-set 65
#endTTL
DDK65JAG
Posts: 20
Joined: Fri Jul 09, 2021 1:21 pm
Has thanked: 0
Been thanked: 4 times

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by DDK65JAG »

If you're using Visible and you have the Visible App on your phone, it probably doesn't matter what TTL/HL you
use, the app is probably tattling on you. Also, I have found that they're looking at your activity on the network, a
few days ago I was getting a 85mbps dl speed(tested that morning), I then dl'd the Win11 update for my Beelink
GKmini. The dl seemed slow, so afterwards I tested the dl speed again, I was being throttled at 5mbps! This is on
Visible using a Gl.inet Mango with ROOter(GO). I use Jims rules , except I set wan0 to 64 as wan0 is where my
modem connects & it doesn't seem to decrement the TTL, tethering connects thru usb0 in my set-up so it stays at
65. I also duplicate those rules for ip6tables/HL since Visible seems to use IPV6.
Anyway those are my observations, so good luck. ddk
User avatar
JimHelms
Site Admin
Posts: 1361
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 192 times
Contact:

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by JimHelms »

@hydrocynus

I updated the rules above to cover the IPV6 tables (which I just noticed did not get copied on my original post).

Another way to write the rules which makes it easier to modify the Interface being used and the TTL assigned to that interface:

Code: Select all

#INTERNAL MODEM 1:
INTERFACE1 = wwan0
TTL1 = 65

#USB MODEM (TETHERED PHONE IN THIS EXAMPLE):
INTERFACE2 = usb0
TTL2 = 65

#startTTL
iptables -t mangle -I POSTROUTING -o INTERFACE1 -j TTL --ttl-set TTL1
iptables -t mangle -I PREROUTING -i INTERFACE1 -j TTL --ttl-set TTL1
iptables -t mangle -I POSTROUTING -o INTERFACE2 -j TTL --ttl-set TTL2
iptables -t mangle -I PREROUTING -i INTERFACE2 -j TTL --ttl-set TTL2
#endTTL

#startTTL
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o INTERFACE1 -j HL --hl-set TTL1
ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i INTERFACE1 -j HL --hl-set TTL1
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o INTERFACE2 -j HL --hl-set TTL2
ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i INTERFACE2 -j HL --hl-set TTL2
#endTTL
hydrocynus
Posts: 28
Joined: Sat Jan 15, 2022 11:42 am
Has thanked: 0
Been thanked: 0

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by hydrocynus »

Thanks guys. I will give it a try.
What do you think about my statement related to ping 8.8.8.8 on my phone giving me a TTL of 114 (in lieu of the expected 64)?
hydrocynus
Posts: 28
Joined: Sat Jan 15, 2022 11:42 am
Has thanked: 0
Been thanked: 0

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by hydrocynus »

I had time to mess up with this again today. The phone outside showed 45-55mbps. I tried the rules as stated above by JimHelms (I really appreciate the script by the way). I tried 64, 65, 64 for wwan0 and 65 for usb0 and it is a no go. I get throttled at 5mbps. Each time, I restarted the firewall, rebooted the router and the phone.
Now, I did notice something. Each time I rebooted the phone and before I ran a speedtest, I noticed that the TTL by pinging 8.8.8.8 showed different number on the phone and on the device hooked up to the wifi of the router.
It changed randomly with TTL such as 114, 113, 112... I stopped rebooting at TTL 112 and tried modifying the rules on the router using 111 (and then 112)... but only restarted the firewall and rebooted the rooter and not the phone since the TTL changes after each reboot. Still a no go, but I was hopeful.

The only thing that worked once yesterday was to use pdanet+ on the phone and the PC in conjunction with pairVPN, when pairVPN notified me I had to stop using pdanet+ in conjunction with pairVPN. But this conflict only happened once and I could not replicate this conflict as the two ran perfectly simultaneously. I was getting faster speed than 5mbps... but less than what my phone was giving me at 40mbps (I only got 10-15mbps but that is fine by me).

Not sure I should root the phone and use magisk hide tethering.

PS. the phone does not have the visible app installed on it.
User avatar
JimHelms
Site Admin
Posts: 1361
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 192 times
Contact:

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by JimHelms »

Can you connect the phone to the router and SSH into the router using putty and run the following command:

Code: Select all

ifconfig -a
Need to see what interface is being assigned to the USB phone. Look for the interface that shows IPV4 and IPV6 addresses.

I do not have a gi.net to test but, and looking at your previous TTL scripts, it is possible their interface naming may be different from the norm.

It is also possible that Visible (via Verizon) has implemented DPI (deep packet inspection) which will require a whole different work around.

I suspect at some point, most carriers will implement DPI to kill the TTL work around-another cat and mouse game.
MattB29
Posts: 241
Joined: Wed Jul 08, 2020 3:09 pm
Has thanked: 18 times
Been thanked: 54 times

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by MattB29 »

Just curious if you had a Linux distro connected device if that would make a difference. I notice when I sign into Google on the net it always tells me that I am trying to connect with a Linux device. So I would guess Windows does the same. If Visible sees a Windows OS it could assume you are tethering.
hydrocynus
Posts: 28
Joined: Sat Jan 15, 2022 11:42 am
Has thanked: 0
Been thanked: 0

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by hydrocynus »

Hello, the interface for the phone is indeed usb0 and wlan0. This is using putty whilst the PC is connected to the router via wifi.

Matt, I have not used a linux machine for about 5 years.
hydrocynus
Posts: 28
Joined: Sat Jan 15, 2022 11:42 am
Has thanked: 0
Been thanked: 0

Re: Messing up with TTL using different variations... still getting throttled and frustrated

Post by hydrocynus »

hydrocynus wrote: Mon Jan 17, 2022 2:46 pm Hello, the interface for the phone is indeed usb0 and wlan0. This is using putty whilst the PC is connected to the router via wifi.

Matt, I have not used a linux machine for about 5 years.
Looks like I will have to root the phone and install magisk hide, use a VPN wifi and other tricks. Unless someone has a recipe that works and is willing to share that solution with me via PM. My lips are sealed as I understand how much work has to be put into a solution that is actually working.
Post Reply

Return to “TTL Settings - Throttling, Tethering and Hotspot Usage”