All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@lists.netfilter.org>
Subject: Re: Iptables rules processing
Date: Fri, 03 Aug 2007 15:23:17 -0500	[thread overview]
Message-ID: <46B38EB5.1010000@riverviewtech.net> (raw)
In-Reply-To: <001b01c7d5f4$91781110$0101000a@tanjian>

On 08/03/07 12:34, Rob Sterenborg wrote:
> This would IMHO only be of real use if you have lots of rules and you 
> want to narrow down the number of rules to be matched.

Agreed.  This is an example of how to optimize the packet flow through
the IPTables chains and rules.  Really it comes down to how many
decisions have to be made for any given packet and trying to rearrange
the chains and rules for optimal packet flow.  Rules are processed
serially / linearly / one by one / (what ever you want to call it) with
in a chain, so the idea is to reduce the number of individual rules and
the complexity there is to make packet traversal as fast as possible.

> In this case you won't notice the difference.

Presuming that the rules that we saw were the only rules in the OPs rule
set I'll agree.  However if there were 10s to 100s to 1000s (or more) of
these sets of rules, then the OPs rule set could very likely benefit
from optimization.  Depending on the number of rules it may be very much
worth the time to split a /24 block in to multiple smaller blocks.



Grant. . . .


  parent reply	other threads:[~2007-08-03 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 16:13 Iptables rules processing Franck Joncourt
2007-08-03 16:23 ` Ray Leach
2007-08-03 17:07   ` Franck Joncourt
2007-08-03 17:34     ` Rob Sterenborg
2007-08-03 17:44       ` Franck Joncourt
2007-08-03 19:29         ` Grant Taylor
2007-08-03 20:03           ` Pascal Hambourg
2007-08-03 20:24             ` Grant Taylor
2007-08-03 20:23       ` Grant Taylor [this message]
2007-08-03 18:43     ` John A. Sullivan III
2007-08-04 20:37 ` Elvir Kuric

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=46B38EB5.1010000@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=gtaylor+reply@riverviewtech.net \
    --cc=netfilter@lists.netfilter.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.