Need help with TTL

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
martin79
DD-WRT Novice


Joined: 19 Oct 2009
Posts: 4

PostPosted: Mon Oct 19, 2009 11:36    Post subject: Need help with TTL Reply with quote
hello,

I need help changing TTL on my router. I need TTL to be 128 when it leaves router. I have done some search and found out that this command should do it.

iptables -t mangles -A PREROUTING -i vlan1 -j TTL --ttl-set 128
iptables -t mangles -A POSTROUTING -o vlan1 -j TTL --ttl-set 128

But I am not sure. I have it set as Firewall rule, is this the right way of changing TTL ?


Sorry for my bad english.
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17638
Location: Hesse/Germany

PostPosted: Mon Oct 19, 2009 11:53    Post subject: Reply with quote
in which direction or port has it to leave with this ttl?
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
martin79
DD-WRT Novice


Joined: 19 Oct 2009
Posts: 4

PostPosted: Mon Oct 19, 2009 12:19    Post subject: Reply with quote
Sash wrote:
in which direction or port has it to leave with this ttl?

In direction of my ISP.
LAN->ISP ttl=128.
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17638
Location: Hesse/Germany

PostPosted: Mon Oct 19, 2009 13:59    Post subject: Reply with quote
port?
wan?
router plattform?

_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
martin79
DD-WRT Novice


Joined: 19 Oct 2009
Posts: 4

PostPosted: Mon Oct 19, 2009 15:31    Post subject: Reply with quote
Sash wrote:
port?
wan?
router plattform?


Yes wan, router dlink dir-400.

My router should be sending everything with ttl 128 to ISP or internet connection will be blocked. That includes DHCP request every 12 hours.
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17638
Location: Hesse/Germany

PostPosted: Mon Oct 19, 2009 18:19    Post subject: Reply with quote
so this implies u r not allowed to use a router to access your isp ;-)

martin79 wrote:
iptables -t mangles -A PREROUTING -i vlan1 -j TTL --ttl-set 128
iptables -t mangles -A POSTROUTING -o vlan1 -j TTL --ttl-set 128

but imho u wont need prerouting since only outgoing packages have to be modyfied -> postrouting only
and i would use the physical interface not the vlan device.

_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
martin79
DD-WRT Novice


Joined: 19 Oct 2009
Posts: 4

PostPosted: Mon Oct 19, 2009 20:36    Post subject: Reply with quote
So I only use
iptables -t mangles -A POSTROUTING -o vlan1 -j TTL --ttl-set 128

?

and I did not get this part "i would use the physical interface not the vlan device", how do I use it ?
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17638
Location: Hesse/Germany

PostPosted: Tue Oct 20, 2009 7:07    Post subject: Reply with quote
yes u should try it this way for now
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum