From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: use of -m limit for Syn Flood protection
Date: Sun, 15 Oct 2006 14:24:31 +0200 [thread overview]
Message-ID: <4532287F.2040407@plouf.fr.eu.org> (raw)
In-Reply-To: <4530E332.4090306@eccotours.co.za>
Hello,
Brent Clark a écrit :
>
> # we allow 4 TCP connects per second, no more
> $IPT -N syn-flood
> $IPT -A syn-flood -m limit --limit 1/s --limit-burst 4 -j LOG
> --log-level info --log-prefix '#### Syn Flood ####'
> $IPT -A syn-flood -m limit --limit 1/s --limit-burst 4 -j RETURN
> $IPT -A syn-flood -j DROP
This accepts only 1 packet per second after an initial 4-packet burst,
and it logs *accepted* packets, not dropped ones. I am not sure this is
what you want.
You probably want something like this instead, assuming there is an
ACCEPT rule later that matches these packets in the calling chain :
$IPT -N syn-flood
$IPT -A syn-flood -m limit --limit 4/s --limit-burst 4 -j RETURN
$IPT -A syn-flood -j LOG --log-level info \
--log-prefix '#### Syn Flood ####'
$IPT -A syn-flood -j DROP
You may also want to set a rate limit in the LOG rule not to prevent SYN
flood but to prevent log flood. ;-)
prev parent reply other threads:[~2006-10-15 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-14 13:16 use of -m limit for Syn Flood protection Brent Clark
2006-10-14 14:17 ` Jiann-Ming Su
2006-10-14 16:45 ` Brent Clark
2006-10-14 20:03 ` Jiann-Ming Su
2006-10-15 12:24 ` Pascal Hambourg [this message]
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=4532287F.2040407@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--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.