TTL config problem

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
thommy181
DD-WRT Novice


Joined: 16 Mar 2019
Posts: 25
Location: Szczecin, Poland EU

PostPosted: Wed Jun 19, 2019 14:14    Post subject: TTL config problem Reply with quote
I have problem with correctly config TTL value to specific value that I want. For example I need have ttl = 65 or 129. I can't config that. When I'm type command
Quote:
iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 65
nothing happen. I'm still have ttl=64. I try this in command tab of webgui and then click save firewall. That is one try without success and second try with run command button. Nothing happen. Third method was via putty there command is proceed and I have ttl=64 still. How can I correct change ttl in my DD-WRT ?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 3785
Location: Netherlands

PostPosted: Wed Jun 19, 2019 15:25    Post subject: Reply with quote
The command itself seems OK, be sure to use the right quotes: ` and not '

Alternatively use:
Code:
iptables -t mangle -I POSTROUTING -o $(nvram get wan_iface) -j TTL --ttl-set 65


telnet to your router with putty execute the command and check if it works with:
iptables -vnL -t mangle

If it works: Administration/Commands and Save Firewall

If you want to hide the fact that the outgoing packet was routed you can also use:
Code:
iptables -t mangle -I POSTROUTING -o $(nvram get wan_iface) -j TTL --ttl-inc 1

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
Simple PBR (Policy Based Routing) script: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318662
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN server setup guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 1914
Location: Texas, USA

PostPosted: Wed Jun 19, 2019 17:36    Post subject: Reply with quote
https://wiki.dd-wrt.com/wiki/index.php/Iptables#Modifying_the_TTL <-- I presume this was what the OP was referring to, from the wiki. It should work 'on the fly' from ssh or telnet CLI. If you save it as part of your firewall script, you should probably reboot the router.... I don't think it automagically refreshes the firewall when you save it....
thommy181
DD-WRT Novice


Joined: 16 Mar 2019
Posts: 25
Location: Szczecin, Poland EU

PostPosted: Wed Jun 19, 2019 18:51    Post subject: Reply with quote
Quote:
iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 65
This command won't working for me. I try reboot device too. TTL is not change and is 64 still. I must try second method.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum