Linux Netfilter discussions
 help / color / mirror / Atom feed
* Which "illegal" tcp-fragments should be blocked?
@ 2008-11-24 17:01 JC Janos
  2008-11-25 14:11 ` Gáspár Lajos
  0 siblings, 1 reply; 5+ messages in thread
From: JC Janos @ 2008-11-24 17:01 UTC (permalink / raw)
  To: Mail List - Netfilter

I've read on numerous sites, and in bunches of examples, that "illegal
tcp fragments" should be blocked early in a firewall rule set.

As I understand it, the rule takes the form,

	iptables -A INPUT -p tcp --tcp-flags "mask" "comp" -j DROP

Every source I read seems to match & block a different combination of
fragments.  So far, the list of "block these" mask/comp pairs that
I've come across are:

	"mask"                            "comp"
	----------------                  ----------------
	ALL                               ALL
	ALL                               NONE
	ALL                               FIN,URG,PSH
	ALL                               FIN,URG,PSH
	ALL                               SYN,RST,ACK,FIN,URG
	ACK                               ACK
	FIN,ACK                           FIN
	FIN,URG,PSH                       FIN,URG,PSH
	SYN                               NONE
	SYN,RST                           SYN,RST
	SYN,FIN,RST,ACK                   NONE
	SYN,FIN,RST,ACK,URG               NONE
	SYN,FIN                           SYN,FIN
	SYN,FIN,RST,ACK                   FIN
	SYN,FIN,RST,ACK,URG               URG
	SYN,FIN                           SYN,FIN
	SYN,FIN,RST,ACK                   SYN,FIN
	SYN,FIN,RST,ACK,URG,PSH,ECE,CWR   FIN,URG,PSH
	SYN,FIN,RST,ACK,URG               SYN,FIN,RST,ACK,URG
	SYN,FIN,RST,ACK,URG,PSH           SYN,FIN,RST,ACK,URG,PSH

Which of these are really valid targets to block?  Each of the pairs
is blocked at least sometimes; noone I've found so far blocks them
all.  Is this list even complete?

Thanks.

--JC

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

end of thread, other threads:[~2008-11-27 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 17:01 Which "illegal" tcp-fragments should be blocked? JC Janos
2008-11-25 14:11 ` Gáspár Lajos
2008-11-26 17:00   ` JC Janos
2008-11-27 14:58     ` Gáspár Lajos
2008-11-27 16:10       ` JC Janos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox