All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] High speed traffic filtering
Date: Fri, 09 Jan 2004 23:10:16 +0000	[thread overview]
Message-ID: <3FFF34D8.8000507@trash.net> (raw)
In-Reply-To: <1073672927.23676.102.camel@tatooin.kelkoo.net>

Vincent Jaussaud wrote:
> Hi;
> 
> First, sorry if this question is mostly netfilter related, than lartc,
> but I think you guys may have a your opinion about this.


You should post this question to the netfilter-devel list, people there
can give you very good advice.

> 
> I'm using Linux 2.4.x with netfilter packet filtering / NAT on our
> front-end firewalls (P500 with 1Gb RAM), which are filtering traffic
> going to our Public Web Sites.
> 
> The traffic is growing very fast since several months.. The average
> traffic filtered by our firewalls, is around 30/40 Mbits/s, with peaks
> around 70 Mbits/s sometimes, so that we had to switch to gigabit
> technologies, to keep a good safe margin.
> 
> Our firewalls are not so high speed machines (P500 with 1Gb RAM), but
> are doing good so far.
> 
> It seems, however, that we are reaching the limits, when approaching 70
> Mb/s... cpu utilization is then near 100%, and the machines start
> dropping packets.
> 
> So, my question is, is netfilter able to handle, let's say gigabit
> traffic filtering ? What kind of hardware would be necessary to handle
> such traffic ?
> 
> Have you guys any experience with filtering such high speed traffic ?

Netfilter sure is able to handle 1gbit, but it doesn't depend that much
on the raw speed. The number of conntracks and simultaneos active
connections matters much more.


> I also thought of two possible solutions, to optimize our current
> firewalls, on which you may have an opinion.
> 
> 1) Disabling statefull inspection, by unloading connection tracking
> modules. 
> I believe netfilter without connection tracking, might be much more
> efficient (We don't need connection tracking actually, since we are only
> filtering HTTP traffic from the others traffics at this point)

That might help, although without stateful filtering the rules
have to be evaluated for each single packet.


> 2) Replace iptables by nf-hipac for packet filtering. Have you guys any
> experience with nf-hipac ? (http://www.hipac.org/)

nf-hipac is very good with a large number of rules, for just http
filtering I suspect iptables will do equally good or better.

> 
> I would be really thanksfull to hear of any solutions / workarounds /
> optimization to keep our linux firewalls handling growing traffic :-)

Try without conntrack if you don't need it, otherwise start with
increasing the hash table size and limit ip_conntrack_max to 2 times
the hash size. There was a thread about optimizing iptables on
netfilter-devel 1-2 month ago, it was started by Hervé Eychenne,
search the archives.

Best regards,
Patrick

> 
> Thanks !
> Vincent.
> 
> ---
> 
> Vincent Jaussaud
> Kelkoo.com Security Manager 
> email: tatooin@kelkoo.com
> 
> "Those who desire to give up freedom in order to gain security will not
> have, nor do they deserve, either one."
>     -- President Thomas Jefferson.    1743-1826
> 
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2004-01-09 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-09 18:28 [LARTC] High speed traffic filtering Vincent Jaussaud
2004-01-09 23:10 ` Patrick McHardy [this message]
2004-01-12 11:14 ` Vincent Jaussaud

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=3FFF34D8.8000507@trash.net \
    --to=kaber@trash.net \
    --cc=lartc@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.