Linux Netfilter discussions
 help / color / mirror / Atom feed
* Order of match extensions
@ 2011-10-06 20:55 Andrew Beverley
  2011-10-06 20:59 ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Beverley @ 2011-10-06 20:55 UTC (permalink / raw)
  To: netfilter

Hi,

Does the order of match extensions matter for iptables rules? Can
someone explain why the following 2 rules produce different results:


1. Matches lots of packets as expected:

iptables -t mangle -A FORWARD -i eth0 -m mark ! --mark 99 \
	-m state --state NEW -m statistic --mode nth --every 1 -j LOG


2. Does not match any packets:

iptables -t mangle -A FORWARD -i eth0 -m state --state NEW \
	-m statistic --mode nth --every 1 -m mark ! --mark 99 -j LOG


The only difference is the place of the "mark" match (either at the end
or the beginning).

(Debian iptables v1.4.8)

Andy



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

end of thread, other threads:[~2011-10-06 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 20:55 Order of match extensions Andrew Beverley
2011-10-06 20:59 ` Jan Engelhardt
2011-10-06 22:34   ` Andrew Beverley

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