Development of a ipt_ID target
Hello!
I wanted to develop a target for ID mangling, I searched the net but I found none (If someone knows one, please show me)
So I started to successfully modify the ipt_TTL mangle target (just to test)
My goal is to achieve a filter that can reset all outgoing IDs to zero, fake the sequence numbering of Windows/Linux boxes or use a random generator.
But I had some problems when I inspected the source code of ipt_TTL.c:
Example:
$IPTABLES -t mangle -A POSTROUTING -o ${INET_DEVICE} -j TTL --ttl-set 128
First of all: It is quite ugly to have one part in the iptables package (the part with the parsing "--ttl-set" is in the iptables package) and having the check and execution code in the kernel...
Since there is a check code in the kernel, can it be used as parsing code, too (I know, this would mean changing some of iptables infra structure)
Second of all: On the netfilter home page I found several files you need to patch
(http://www.netfilter.org/documentation/pomlist/pom-base.html#TTL)
- Is there a program to apply all these patches at once AND: where is the iptables patch for the argument parsing?
Oh, and why is the checksum method marked as "need a new one" ?
And a third question: Why is this ipt_TTL.c target missing in some kernel versions (Gentoo, version 2.4.20r9 have it, 2.4.22r2 does not have it) ? Since the code for parsing the target is in, why does it miss in the kernel sources?
Ok, I hope I did not ask too many questions and I hope I documented it all in a way everyone can understand me ;-)
Signature · 2 lines
Regards, Michael mailto:[email protected]