All of lore.kernel.org
 help / color / mirror / Atom feed
* module order: tcp/conntrack vs. conntrack/tcp
@ 2012-07-02 12:02 Wouter
  2012-07-02 12:16 ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Wouter @ 2012-07-02 12:02 UTC (permalink / raw)
  To: netfilter



Hello,

I'm wondering about the practical difference between these seemingly
equivalent rules (notice the module order):

iptables -A INPUT -i eth0 -p tcp --dport 8140 -m state --state NEW -j
ACCEPT
iptables -A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 8140
-j ACCEPT

[root@test1 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8140
state NEW
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
dpt:8140

Rule 1: TCP --> state
Rule 2: state --> TCP

While I always use the form of rule 1 (filter first, then state NEW), I
found some systems configured like rule 2 – which appears to have the same
end result – and I wonder if rule 2 (state first, then filter) has any side
effects or causes more overhead.

Thanks for for any insight!

  Wouter

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

end of thread, other threads:[~2012-07-04  5:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 12:02 module order: tcp/conntrack vs. conntrack/tcp Wouter
2012-07-02 12:16 ` Jan Engelhardt
2012-07-02 12:49   ` Wouter
2012-07-03  1:57   ` Julien Vehent
2012-07-03 11:56     ` Jan Engelhardt
2012-07-04  5:47       ` Julien Vehent

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.