All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Du Caju <Jan.DuCaju@kuleuven.net>
To: henry <info@intellitree.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Performance isues related to a large number of iptables rules
Date: Fri, 14 Jan 2005 00:14:55 +0100	[thread overview]
Message-ID: <20050113231455.GA17451@kuleuven.net> (raw)
In-Reply-To: <41E6FA0E.2060707@intellitree.com>

Hi,

On Thu, Jan 13, 2005 at 05:45:34PM -0500, henry wrote:
> I am curious what is the maximum number of iptable rules that can be 
> installed in a config before performance starts to be a problem. I have 
> looked into the possibility of using firewall rules to block "bad" 
> networks, but I have been told by most people that I have asked that 
> this is bad idea.
> 
> Here are my thoughts. If a packet matches the 3rd rule, does it matter 
> if there are 100,000 rules below it? 1,000,000 rules below it? If it 
> doesn't, then does the number of allowable rules really have to do with 
> how intelligently the rules are written, and more specifically, in what 
> order?

If you want to deal with large rule sets and/or high bandwidth you should
definitely consider hipac (http://www.hipac.org)

Quoted from the hipac web-site:
 iptables, like most packet filters, uses a simple packet classification
 algorithm which traverses the rules in a chain linearly per packet
 until a matching rule is found (or not). Clearly, this approach lacks
 efficiency. As networks grow more and more complex and offer a wider
 bandwidth linear packet filtering is no longer an option if many rules
 have to be matched per packet. Higher bandwidth means more packets per
 second which leads to shorter process times per packet.

 With nf-HiPAC we offer a novel framework for packet classification
 which uses an advanced algorithm to reduce the number of memory lookups
 per packet. It is ideal for environments where large rulesets and/or
 high bandwidth networks are involved. Thereby, the iptables' semantics
 of the rules is preserved, i.e. you can construct your rules like
 you're used to. From a user's point of view there is no need to
 understand anything about the HiPAC algorithm.

At the hipac site you will find a comparison with iptables. The central
firewall of our university ( http://www.kuleuven.ac.be/english/ ) uses 
hipac and we are very pleased with it. At the moment there is only an 
implementation for a 2.4 kernel but the developers are working on a 
2.6 version :-)

Hope this helps,
Jan
--------------------------------------------------- KULeuvenNet -------
Jan.DuCaju@kuleuven.net         http://www.kuleuven.net/e_index.html
K.U.Leuven                      http://www.kuleuven.ac.be/english/
LUDIT - KULeuvenNet             http://ludit.kuleuven.be/index_en.html
de Croylaan 52A                 3001 Leuven                     Belgium
-----------------------------------------------------------------------


  reply	other threads:[~2005-01-13 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 22:45 Performance isues related to a large number of iptables rules henry
2005-01-13 23:14 ` Jan Du Caju [this message]
2005-01-13 23:31 ` R. DuFresne
2005-01-14  1:32 ` Samuel Jean

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=20050113231455.GA17451@kuleuven.net \
    --to=jan.ducaju@kuleuven.net \
    --cc=info@intellitree.com \
    --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.