Posted: Thu Mar 01, 2018 19:03 Post subject: Fun with IPtables, router refuses to change TTL value?
I'm trying to bridge my 4G hotspot onto a R7000 so I can have a home network where all the devices aren't being throttled (Tmobile).
My original success was only through my PC by changing the PC's default TTL to 65. A simple regedit trick.
I thought the obvious thing was to take a dd-wrt router and command line:
iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 65
But it spits back that the value 65 is invalid.
if I just increase the TTL by one (as is the rational behind the PC trick):
iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-inc 1
The command is accepted, but my tablets and other devices are still throttled. Should I be changing wanface as I'm using a virtual log in through the repeater bridge?
I don't know if there's a more elegant way to do all this. I'm in way over my head because I don't understand the difference between the repeater bridge and the iptable commands. Any help would be much appreciated!
Ok, thanks for the input. I am happy to report that I got it to work, I'll detail the steps I took. This is specific to tmobile one cell plans.
Caveats: I have not tried with with an unrooted yet or with WPA security enabled. All I can say is that I've set my cell's dun global hotspot to 0 and set my cell's ttl to 65 after rooting it. The rest is through the router.
Follow the steps here:
https://www.dd-wrt.com/wiki/index.php/Repeater
until you get to step 5, do NOT disable your firewall, you need the IP tables to mangle the TTL.
If your connection is stable, you can proceed to the Run Command scripting area of the Administration tab. Enter the following codes:
iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i `get_wanface` -j TTL --ttl-set 65
And hit Run Command. as far as I can understand, this sets the TTL for packets going out and in of the router to a setting Tmobile sniffs to determine if you're using 'desktop mode' in your browser. Or something like that.
Hit Save Startup after
Hit Apply (don't know if you need to but I always do).
I'll continue to experiment with details and follow up for the thread. This has been a long process of months of head scratching and I'm hoping this will stick.