Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to change the TTL field of the packets who go out from my Linux box. I tried iptables -t nat -A POSTROUTING -j TTL --ttl-set xxx
and when I set xxx to any positive number(i tried for example 150) all I cant get it's an error who says that cannot find chain/match/... and smth.!!!
why???? the syntax seem quite good to me???
I have iptables 1.2.7 and kernel 2.4.20-pre2!
ooops! sorry... bad posting... of course -t mangle...!!! I give: iptables -t mangle -A POSTROUTING -j TTL --tll-set xxx
what is really strange is that if I say --ttl-dec 0 it says that 'decreasing by 0?' and whan I give a positive natural value it says: 'iptables: No chain/target/match by that name'!!!
what the HELL???
Also, again according to the tables section of the iptables manpage:
This table is used for specialized packet alteration. It has two built-in chains: PREROUTING (for altering incoming packets before routing) and OUTPUT (for altering locally-generated packets before routing).
Note postrouting is missing. Have you tried -A OUTPUT? (I would test it out for you but I don't have TTL target compiled.
There is a kernel patch needed for the -j TTL target.
It adds another netfilter option before you compile a new kernel...
Check http://www.netfilter.org/documentati...-base.html#TTL for more details.
and you need to enter
iptables -t mangle -I PREROUTING -i ethinternal -j TTL --ttl-set xxx
EVERY forwarded packet has to come into the box via mangle prerouting, so it's done there. For locally generated packets use the OUTPUT chain.
You will need to adjust the --ttl-set xxx value to make them match. There is a different decrement in each chain.
Last edited by peter_robb; 08-29-2002 at 12:15 PM.
thanks for advice but I know how to compile a new kernel... but the problem is that I really don't know how to patch him with that patch-o-matic. I've read those help files and... I'm still ... confused! Something is missing...!!! please be so kind and give me some hints...(maybe I should transfer the thread to Software forum... should I?!)
I don't mean to gravedig maliciously, but I understand that if I type the following in console as root
iptables -t mangle -A PREROUTING -i eth0 -j TTL --ttl-set 64
iptables -t mangle -A OUTPUT -j TTL --ttl-set 64
Then all packets will leave my machine with a TTL equal to 63 ?
Am I correct? Will packets routed from PCs within my internal network be have indistinguishable TTL from those generated by the gateway?