TCP sequence checking
Hello everybody,
Does iptables support TCP sequence checking, to check if a TCP packet has a valid sequence number (according to previous packets of the same TCP connection)?
Many thanks in advance!
KR,
Lukas
Quoted 3 lines · Lukas Hubschmid (s)
Does iptables support TCP sequence checking, to check if a TCP packet has a valid sequence number (according to previous packets of the same TCP connection)?
Yes, have a look at net/netfilter/nf_conntrack_proto_tcp.c in the kernel source tree.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
Thank you Jozsef!
I am not quite sure if I read the C-code correctly - so TCP sequence checking seems to be enabled by default, right? Or do I need to set some flag when adding a rule?
KR,
Lukas
Am 03.06.2015 um 19:16 schrieb Jozsef Kadlecsik:
Quoted 15 lines · Lukas Hubschmid (s)
Quoted 4 lines
Does iptables support TCP sequence checking, to check if a TCP packet has a valid sequence number (according to previous packets of the same TCP connection)?
Yes, have a look at
net/netfilter/nf_conntrack_proto_tcp.cin the kernel source tree.Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of SciencesH-1525 Budapest 114, POB. 49, Hungary
Quoted 3 lines · Lukas Hubschmid (s)
I am not quite sure if I read the C-code correctly - so TCP sequence checking seems to be enabled by default, right? Or do I need to set some flag when adding a rule?
No, it's default enabled. You can (partiall) switch it off globally via a sysctl setting, not with some flag in a rule.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary