Page 1 of 1

How to change the TTL value to 64 (openWRT)

Posted: Mon Nov 06, 2023 2:04 am
by hkm2030
Of course, the idea of changing TTL to 64 in short is that the router is like a mobile (full speed and without restrictions, meaning that you are installed the SIM on your mobile).

The idea is a little complicated but easy for the person who has already rooted and opened the telnet port on the router (I have already explained it)

First: Open the putty program and call telnet port number 23

Second: We create an empty script file and to transfer ⁦ ttl.sh⁩

Third: We modify the file through the following command:

Vi /etc/init.d/ttl.sh

Fourth: We write these commands and then save the file by command :x

Sleep 45

IPtables -t mangle -F

Ip6tables -t mangle -I POSTROUTING -o rmnet_data0 -j HL --hl-set 64

Ip6tables -t mangle -I PREROUTING -i rmnet_data0 -j HL --hl-set 64

Iptables -t mangle -I POSTROUTING -o rmnet_data0 -j TTL --ttl-set 64

Iptables -t mangle -I PREROUTING -i rmnet_data0 -j TTL --ttl-set 64

Exit 0

Fifth, we write the following command:

Chmod 755 /etc/init.d/ttl.sh

Sixth: We write the following command:

‏Vi /etc/init/early_init.sh

Seventh: We write the following command:

‏/Etc/init.d/ttl.sh &

Then we save the edits by command:x

Finally, we are making a restar for the router and congratulations on changing the value of TTL to 64.

Re: How to change the TTL value to 64

Posted: Mon Nov 06, 2023 6:07 pm
by Rich Hathaway
I dont know if you looked or anyone told you but the ttl value in this router is 64 by default.
Executing those commands only change the tether to not decrement if using data thru the cable but not the wifi, and there is no need to change prerouting if you are changing postrouting, the more tasks you give your device to do for every single packet in and out the more it will slow it down.

Re: How to change the TTL value to 64

Posted: Tue Nov 07, 2023 7:02 am
by hkm2030
Is the value raised to 128 or is the method ineffective?

Re: How to change the TTL value to 64

Posted: Tue Nov 07, 2023 8:18 am
by Rich Hathaway
You posted this and it seems like you posted it as working, but now you are asking me if it works? I do not use anything like this to change ttl so I could not possibly tell you if it works.
I will tell you some of these devices in the mr series do not exit the VI editor correctly which means you have to use another editor or pull edit and then push back.
and no, how can the value possibly be raised to 128?
But if you do not know if what you posted works it would be nice if you would be honest with the members here and put that in there so they are not trying it and wasting time or possibly messing up their devices.

Re: How to change the TTL value to 64

Posted: Wed Nov 08, 2023 3:21 am
by hkm2030
I have applied the method to my device and it works very efficiently. The method is very safe, but no one in this community has touched on it except me. You say it is ineffective and I say that I applied it and it is very effective and the performance of the device has become close to mobile phone disease.

Re: How to change the TTL value to 64

Posted: Wed Nov 08, 2023 5:36 am
by Rich Hathaway
You misunderstood me, I did not say it is ineffective, I said " I do not use anything like this to change ttl" You asked if it was ineffective. I think maybe you are using a translator perhaps? and it is easy to get things misunderstood with translators.

Re: How to change the TTL value to 64

Posted: Wed Nov 08, 2023 8:25 am
by hkm2030
It works well and sometimes used to translate some items to not recruit anything wanted

Re: How to change the TTL value to 64

Posted: Wed Nov 08, 2023 1:18 pm
by cybrnook
Also, you have a typo:

Code: Select all

Seventh: We write the following command:

‏/Etc/init.d/ttl.sh &
/Etc you have capitalized, so that likely wouldn't be a valid path.... Just calling that out if you're going to try and share with others. No comment on the rest of it.

Re: How to change the TTL value to 64

Posted: Thu Aug 22, 2024 3:43 pm
by Alokyirq
don't working for me :(
can you help me!


Seventh: We write the following command:

‏/Etc/init.d/ttl.sh &
When I try to save the file using vi, an error appears.

Re: How to change the TTL value to 64

Posted: Fri Aug 23, 2024 10:48 pm
by BillA
Alokyirq wrote: Thu Aug 22, 2024 3:43 pm don't working for me :(
can you help me!

When I try to save the file using vi, an error appears.

/Etc/init.d/ttl.sh &

Should be

/etc/init.d/ttl.sh &

Re: How to change the TTL value to 64

Posted: Fri Sep 20, 2024 11:09 pm
by yamajason
Which device is this for?

Re: How to change the TTL value to 64

Posted: Mon Sep 23, 2024 4:13 pm
by Didneywhorl
yamajason wrote: Fri Sep 20, 2024 11:09 pm Which device is this for?
openWRT / Linux