OpenWrt Forum Archive

Topic: iptables TTL target howto ?

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I really need to do someting like that on my wrt54gs:

iptables -t mangle -A PREROUTING -i vlan1 -j TTL --ttl-inc 1
iptables -t mangle -A PREROUTING -o vlan1 -j TTL --ttl-inc 1

How to add TTL target support ?


---
Arv.

Is it at least on TODO list ?

Not really.

There is ipt_ttl.o module which allows to filter on ttl values.
What I need is ipt_TTL.o which enables TTL target (-j TTL).
Support for TTL target requires some patches from path-o-matic. I did it on PC few times however I'm worrying not to brick my wrt54gs ;-(. So I appreciate help.

---
Arv.

The current experimental doesn't apply POM automatically.

The file in iptables-extra_1.3.1-1_mipsel.ipk is libipt_TTL.so, which is a user space module.  He still needs the kernel module ipt_TTL.o in addition to that.

(Last edited by mtakahar on 2 May 2005, 04:44)

Would anyone with experience build it ?

If you like to try unofficial pre-release stuff, have a look at my GCC 3.4 build at http://openwrt.inf.fh-brs.de/~nbd/gcc34/
It should include a TTL module in kmod-iptables-extra, iptables-extra (please do not try to install kernel modules from that repository on your official experimental build, it may lead to unexpected kernel behavior).

nbd wrote:

If you like to try unofficial pre-release stuff, have a look at my GCC 3.4 build at .

Thanks a lot. I'll try it. (and I hope I won't brick my router)

---
Arv.

Are you load kernel module before use of "iptables (...) -j TTL (...)"?
insmod ipt_TOS.o
or sth like this...

the TTL patch is included in the latest official patch-o-matic ng pack. I'll try to test it as soon as possible

No need to. We had it in CVS for a while now. If you want to test it, you can just grab my build at http://openwrt.inf.fh-brs.de/~nbd/gcc34/ (it's in kmod-iptables-extra, iptables-extra)

it is possible to change TTL on WAN side on Motorola WR850G ?

The discussion might have continued from here.