All of lore.kernel.org
 help / color / mirror / Atom feed
From: Friedrich Lobenstock <fl@fl.priv.at>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: Re: question regarding iptables tuning (was Re: iptables denial of services)
Date: Sat, 17 Apr 2004 20:53:50 +0200	[thread overview]
Message-ID: <40817D3E.3010202@fl.priv.at> (raw)
In-Reply-To: <Pine.LNX.4.44.0404172007210.22427-100000@filer.marasystems.com>

Henrik Nordstrom wrote on 17.04.2004 20:18 MET:
> On Sat, 17 Apr 2004, Friedrich Lobenstock wrote:
> 
> 
>>Thanks, but can you give some background info about the hash size parameter 
>>of ip_conntrack as the description on the page above is rather lacking any 
>>reasons:
>>- Is this parameter automatically sized according to the amount of
>>   installed memory?
> 
> Yes.
> 
> 
>>- How is it related to ip_conntrack_max?
> 
> ip_conntrack_max = 8 * hah_size

What is the downside if that equation is not fullfilled by running
   echo "xxxx" > /proc/sys/net/ipv4/ip_conntrack_max
without setting the hashsize=yyyy parameter?


>>- What's the amount of memory that is allocated based on this
>>   parameter?
> 
> Depends a little on what conntrack & nat helpers etc you enabled when the
> kernel is built. In my kernel each conntrack currently uses ca 384 bytes, 
> most others probably use less..

Wouldn't it be good if ip_conntrack exports that size via /proc? Would help 
the average user to estimate the influence of increasing ip_conntrack_max.

> The amount of memory allocated based on the hash size is pretty marginal, 
> what one needs to keep track of is the total number of connections as this 
> is the bulk of the memory usage.

So the hash size also limits the amount of connections?

> As for suggested defaults: If this is a general purpose server then the
> automatic defaults. On a dedicated firewall scale the memory and conntrack
> based on how many concurrent sessions you need to support but I would not
> recommend to assign more than 50% of your memory to conntrack.

And why if I may ask? Management overhead, or what?
For example a machine with 1GB RAM router only, couldn't we assign eg. 
768MB to conntrack?

Another side question, can you add this information to the netfilter FAQ?

-- 
MfG / Regards
Friedrich Lobenstock

  reply	other threads:[~2004-04-17 18:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 18:31 iptables denial of services Jorge Garcia
2004-04-16  7:10 ` Ozgur AKAN
2004-04-16 10:03 ` Henrik Nordstrom
2004-04-17 11:13   ` Friedrich Lobenstock
2004-04-17 16:49     ` Henrik Nordstrom
2004-04-17 17:22       ` question regarding iptables tuning (was Re: iptables denial of services) Friedrich Lobenstock
2004-04-17 18:18         ` Henrik Nordstrom
2004-04-17 18:53           ` Friedrich Lobenstock [this message]
2004-04-17 23:49             ` Henrik Nordstrom
2004-04-17 19:08         ` Pablo Neira
2004-04-17 19:58           ` Friedrich Lobenstock
2004-04-17 20:18             ` Friedrich Lobenstock
2004-04-17 20:33               ` Martin Josefsson
2004-04-17 20:41                 ` Friedrich Lobenstock
2004-04-17 20:58                   ` Martin Josefsson
2004-04-17 21:13                     ` Friedrich Lobenstock
2004-04-22 12:23                     ` Herve Eychenne
2004-04-22 20:44                       ` Friedrich Lobenstock
2004-04-18 12:55             ` Tarek W.
2004-04-18 13:29             ` Tarek W.

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=40817D3E.3010202@fl.priv.at \
    --to=fl@fl.priv.at \
    --cc=netfilter-devel@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.