All of lore.kernel.org
 help / color / mirror / Atom feed
* Port Scanning: Is there a difference between stateful INVALID  filtering and stateless TCP flag filtering?
@ 2010-02-24  8:18 paddy joesoap
  2010-02-24 11:12 ` Mart Frauenlob
  0 siblings, 1 reply; 5+ messages in thread
From: paddy joesoap @ 2010-02-24  8:18 UTC (permalink / raw)
  To: netfilter

Hello everyone,

When preventing (nmap) port scans is it better to use the
connection-tracking INVALID option or use a set of TCP flag filters or
both?

Note, by my calculations there are 21 possible combinations of TCP
flags, this includes legal and illegal flag combinations.

ASIDE:
Can stateful filtering using NEW and ESTABLISHED on their own also
work, given that connection-tracking is supposed to be tracking
connections?
For example, allow outbound NEW and ESTABLISHED traffic and allow
inbound traffic recognised as ESTABLISHED.
Would these stateful operations prevent nmap scanning?

I saw a few examples where the stateless tcp syn flag match was used
(by checking that no other flag was set) in conjunction with the NEW
operator.
For example, iptables -A INPUT -p tcp ! --syn -m state --state NEW -j
DROP # using the not (!) operator

Why is this the case? I would have imagined that the NEW operator,
would require by default that only a syn flag be present. Unless the
NEW operator does not check by default that no other flag is enabled
in conjunction with the syn flag. Would this be the case?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-26  6:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24  8:18 Port Scanning: Is there a difference between stateful INVALID filtering and stateless TCP flag filtering? paddy joesoap
2010-02-24 11:12 ` Mart Frauenlob
2010-02-24 11:20   ` Mart Frauenlob
2010-02-26  6:52     ` ratheesh k
2010-02-25  3:32   ` J. Bakshi

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.