From: Wouter <wouter-netfilter@publica.duodecim.org>
To: netfilter@vger.kernel.org
Subject: module order: tcp/conntrack vs. conntrack/tcp
Date: Mon, 02 Jul 2012 08:02:19 -0400 [thread overview]
Message-ID: <9bfb14742a7ec35d775699fc955f437b@localhost> (raw)
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
next reply other threads:[~2012-07-02 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 12:02 Wouter [this message]
2012-07-02 12:16 ` module order: tcp/conntrack vs. conntrack/tcp 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bfb14742a7ec35d775699fc955f437b@localhost \
--to=wouter-netfilter@publica.duodecim.org \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.