All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wouter <wouter-netfilter@publica.duodecim.org>
To: Jan Engelhardt <jengelh@inai.de>
Cc: netfilter@vger.kernel.org
Subject: Re: module order: tcp/conntrack vs. conntrack/tcp
Date: Mon, 02 Jul 2012 08:49:28 -0400	[thread overview]
Message-ID: <2c07aacd811d81e9b28165bd1123cad5@localhost> (raw)
In-Reply-To: <alpine.LNX.2.01.1207021414160.9210@frira.zrqbmnf.qr>


On Mon, 2 Jul 2012 14:16:10 +0200 (CEST), Jan Engelhardt <jengelh@inai.de>
wrote:
> On Monday 2012-07-02 14:02, Wouter wrote:
> 
>>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
>>
>>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.
> 
> The use of -m conntrack (state is obsolete) is cheaper than people 
> think, because the ct belonging to a packet is already long determined, 
> so looking at the state is quite simple.

So there are no negative side effects from conntrack --> tcp versus the
more common tcp --> conntrack?

Thanks for the speedy reply,

  Wouter


  reply	other threads:[~2012-07-02 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=2c07aacd811d81e9b28165bd1123cad5@localhost \
    --to=wouter-netfilter@publica.duodecim.org \
    --cc=jengelh@inai.de \
    --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.