All of lore.kernel.org
 help / color / mirror / Atom feed
* ram and processor cycles for a firewall machine
@ 2004-10-01  6:35 Askar
  2004-10-01 11:53 ` Jose Maria Lopez
  2004-10-01 13:37 ` Jason Opperisano
  0 siblings, 2 replies; 9+ messages in thread
From: Askar @ 2004-10-01  6:35 UTC (permalink / raw)
  To: netfilter

hi all,
im in the process of changing my fw machine for that atm im simulating
and testing. I got a very fair question
1) How much RAM and and processor would be best for moderate firewall box?
Unfortunatly currently my company running the fw on a P-III 500MHz
with 128MB of RAM.
I am wondering if I change to default DROP things (atm its default
ACCEPT) aren't these specification kinda makes problem?

right now 75 users online the /proc/net/ip_conntrack shows 

egrep 'ESTABLISHED|ASSURED' /proc/net/ip_conntrack | wc -l
   4888
cat /proc/net/ip_conntrack | wc -l
   6511

well these number would probably little higher when 120 users online.
Is my current fw machine specs adequate for such ip_conntrack load?

regards
Askar
(after bouncing head on desk for days trying to get mine working, I'll make
your life a little easier)


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: ram and processor cycles for a firewall machine
@ 2004-10-01 20:55 Daniel Chemko
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Chemko @ 2004-10-01 20:55 UTC (permalink / raw)
  To: Askar, Jason Opperisano; +Cc: netfilter

Askar wrote:
> thanks jose alot, okay i will upgrade ram to 128 * 2 = 256MB thanks,
> however where should I look for optimization the iptables rules?
> any link will be greatly appreciated

This is more of a manual activity. Things to speed up the ruleset would
be:

Putting the ESTABLISHED,RELATED rule above all others in its respective
chain. This avoids the lookups for all the match rules.

If you have a match rule with a 100000 hits during an interval, put it
before a match rule with 100 hits. This way, the inefficiency of
processing the more obscure rule is minimized.

This isn't so much of a big deal unless you have either insane amounts
of traffic, or many very very small sessions. Hosting 'normal' users, I
have 99.97% of my traffic hitting the ESTABLISHED,RELATED filtering
rule, so the efficiency of the other rules in my stack is
unconsequential.


# All Traffic
AAA="`iptables -t filter -nvxL FORWARD | egrep -v 'FORWARD|pkts' | awk
'{print $2}' | sed s/"$"/"+"/`"; echo ${AAA}0| bc

# Only ESTABLISHED,RELATED traffic
AAA="`iptables -t filter -nvxL FORWARD | grep 'RELATED,ESTABLISHED' |
awk '{print $2}' | sed s/"$"/"+"/`"; echo ${AAA}0| bc

% of traffic in ESTABLISHED,RELATED is just the second number divided by
the first.  The larger the percentage, the less any subsequent rule
arrangement will matter.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-10-03 23:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01  6:35 ram and processor cycles for a firewall machine Askar
2004-10-01 11:53 ` Jose Maria Lopez
2004-10-01 13:37 ` Jason Opperisano
2004-10-01 19:29   ` Askar
2004-10-01 20:18     ` Mike
2004-10-01 21:09       ` Aleksandar Milivojevic
2004-10-02  6:19         ` Askar
2004-10-03 23:20           ` Mike
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 20:55 Daniel Chemko

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.