TCP match and IP fragmentation
Hi,
I need some clarification on how ip fragmentation
and tcp match interact. The tcp match seems to not match any non-first fragments (return 0 if offset is non-zero). So, if I have a rule to accept tcp packets to a certain port in a chain, and no other rules, does that mean that the first fragment is accepted and the later ones not accepted? Do correct me if I have got anything wrong.
=====
Regards,
Kiran Kumar Immidi
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
Quoted 4 lines · Kiran Kumar
I need some clarification on how ip fragmentation
and tcp match interact. The tcp match seems to not match any non-first fragments (return 0 if offset is non-zero).
Probably correct. One could think that -p tcp without any additional TCP matches would match tcp fragments but it does not.
Quoted 4 lines
So, if I have a rule to accept tcp packets
to a certain port in a chain, and no other rules, does that mean that the first fragment is accepted and the later ones not accepted?
Yes. When not using conntrack you must manually deal with fragments using the the fragment match. The only issue is that you can not match the protocol field of fragments.
If you are using conntrack then fragments are not an issue as all traffic is defragmented before entering iptables.
Regards
Henrik