Skip to contentSkip to conversation

mangle + TCP Flags

DISCUSSION Jean-Marie 3 participants 4 messages Dec 10, 2003

lore
Share & tools
lore

Jean-Marie

author
#0 lore raw

Hello, can someone tell me if it is possible, thanks to the mangle table, to modify the flags of a TCP packet before it is routed. I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG
Thank you.

#1 lore raw

Hi,

Quoted 2 lines

I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG

There is no such module. It would be possible to do that. If a module like this existed it would be a

Quoted 3 lines

Thank you.

#2 lore raw
In reply to Jean-Marie

[Oops, sorry there for incomplete mail :)]
Hi,

Quoted 2 lines

I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG

There is no such module. It would be possible to do that. If a module like this existed it would be a great way to violate the protocol
and cause antisocial behaviour of your tcp stack.

Anyway such a module is not difficult to write. So it is possible, but nor the iptables package and the kernel, nor patch-o-matic do not contain such a module.

Regards,
Maciej

#3 lore raw
Quoted 9 lines · Maciej Soltysiak

[Oops, sorry there for incomplete mail :)]
Hi,

Quoted 2 lines

I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG

There is no such module. It would be possible to do that. If a module like this existed it would be a great way to violate the protocol and cause antisocial behaviour of your tcp stack.

There are plenty of ways to do that already - I don't think one more would
hurt.... :)

Enough people think that un-decrementing the TTL field, or DROPping packets without sending back RST or ICMP, is a bad enough violation of the protocol (both of these are easily possible with netfilter as it is).

Antony.

Signature · 7 lines
Perfection in design is achieved not when there is nothing left to add, but 
rather when there is nothing left to take away.

 - Antoine de Saint-Exupery

                                                     Please reply to the list;
                                                           please don't CC me.