* TCP flags
@ 2002-11-06 8:03 Jet
2002-11-06 12:12 ` Maciej Soltysiak
2002-11-06 12:30 ` Mark Vevers
0 siblings, 2 replies; 5+ messages in thread
From: Jet @ 2002-11-06 8:03 UTC (permalink / raw)
To: netfilter@lists
Helo,
Can anyone just explain what is this means?
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
I don't quite understand why there is a white space between SYN,FIN and
SYN,FIN.
.//Jet
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TCP flags
2002-11-06 8:03 TCP flags Jet
@ 2002-11-06 12:12 ` Maciej Soltysiak
2002-11-06 12:30 ` Mark Vevers
1 sibling, 0 replies; 5+ messages in thread
From: Maciej Soltysiak @ 2002-11-06 12:12 UTC (permalink / raw)
To: Jet; +Cc: netfilter@lists
Hello,
> Can anyone just explain what is this means?
>
> iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
>
> I don't quite understand why there is a white space between SYN,FIN and
> SYN,FIN.
iptables -p tcp --help
explains that it is:
--tcp-flags [!] mask comp match when TCP flags & mask == comp
(Flags: SYN ACK FIN RST URG PSH ALL NONE)
So if we want tcp packets having only SYN and FIN set, and no other flags,
we need the packets flags & SYN|FIN == SYN|FIN.
Where & means a logical AND.
Example.
IF a packet comes with SYN|ACK|FIN flags set, we logically AND it with
SYN|FIN (mask), we get SYN|FIN, and thus we get a match with SYN|FIN (comp)
Regards,
Maciej Soltysiak
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: TCP flags
2002-11-06 8:03 TCP flags Jet
2002-11-06 12:12 ` Maciej Soltysiak
@ 2002-11-06 12:30 ` Mark Vevers
1 sibling, 0 replies; 5+ messages in thread
From: Mark Vevers @ 2002-11-06 12:30 UTC (permalink / raw)
To: Jet, netfilter@lists
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 06 Nov 2002 08:03, Jet wrote:
> Can anyone just explain what is this means?
>
> iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
>
> I don't quite understand why there is a white space between SYN,FIN and
> SYN,FIN.
Yup - it means inspect the SYN and FIN flags and if they are both set drop the
packet. i.e. just look at the SYN and FIN flags - don't worry about any
others when doing the test to see if the rule matches.
The first pair are the flags to inspect, the second pair (after the space) are
the state of the flags to test.
Mark
- --
Mark Vevers. mark@ifl.net / mark@vevers.net
Principal Internet Engineer, Internet for Learning,
Research Machines Plc. (AS5503)
- --
GPG Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB08F3CA3
Fingerprint: 85BA 30C4 9EC8 1792 4C8C C31E 58B5 3D1C B08F 3CA3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9yQtLWLU9HLCPPKMRAp8iAKCKQP6xrcuvP6UfglVcf0dl2owthwCfcKpU
7tz1W4J2UBkGvYH/dMTsZWU=
=FNMb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* TCP Flags
@ 2003-12-23 15:05 zippo
2003-12-23 15:14 ` Antony Stone
0 siblings, 1 reply; 5+ messages in thread
From: zippo @ 2003-12-23 15:05 UTC (permalink / raw)
To: netfilter
Hi all!
I need if anyone can send me a list with all the invalid combinations of
TCP flags.
Thx. :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-12-23 15:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-06 8:03 TCP flags Jet
2002-11-06 12:12 ` Maciej Soltysiak
2002-11-06 12:30 ` Mark Vevers
-- strict thread matches above, loose matches on Subject: below --
2003-12-23 15:05 TCP Flags zippo
2003-12-23 15:14 ` Antony Stone
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.