All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jimmy Stewpot <qmail@oranged.to>
To: netfilter@vger.kernel.org
Subject: iptables performance problems
Date: Wed, 19 Dec 2007 09:54:26 +0000	[thread overview]
Message-ID: <4768EA52.7070602@oranged.to> (raw)

Hello,

I am currently using iptables on Linux kernel version 2.6.15 (Ubuntu 
Dapper). I have recently been having problems with my servers load going 
through the roof as remote hosts do nmap scans against the server. My 
current iptables configuration is as follows

# Generated by iptables-save v1.3.3 on Thu Dec 13 09:03:30 2007
*filter
:INPUT DROP [276260:84041130]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [10126068:4010046750]
-A INPUT
-A INPUT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s 10.0.0.0/255.0.0.0 -i eth1 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j 
ACCEPT
-A INPUT -d FIRST_PUB_ADDR -i eth0 -p tcp -m tcp --tcp-flags SYN,RST,ACK 
SYN -m multiport --dports 21,25,80,110,143,443,993,995 -j ACCEPT
-A INPUT -d SECOND_PUB_ADDR -i eth0 -p tcp -m tcp --tcp-flags 
SYN,RST,ACK SYN -m multiport --dports 80,443 -j ACCEPT
-A INPUT -i eth0 -p udp -m multiport --dports 161 -j ACCEPT
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j LOG --log-level 1
-A INPUT -m limit --limit 10/min -j LOG --log-prefix "Dropped: " 
--log-level 1
-A OUTPUT -o eth0 -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -d 10.0.0.0/255.0.0.0 -o eth1 -j ACCEPT
COMMIT

It seems from my performance diagnostics its the logging which is 
causing the system to buckle rather than the packet rate or anything 
like that. Since I first noticed the system being hammered I put the -m 
limit --limit 10/min on the LOG rule but it appears to either not work 
or I have put it in the wrong place. Can anyone give me some advice 
regarding performance and logging.

Regards,

Jimmy

             reply	other threads:[~2007-12-19  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-19  9:54 Jimmy Stewpot [this message]
2007-12-19 10:05 ` iptables performance problems Shaun Mccullagh
2007-12-19 10:28 ` G.W. Haywood

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=4768EA52.7070602@oranged.to \
    --to=qmail@oranged.to \
    --cc=netfilter@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.