From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: netfilter@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: rate limit not working ?
Date: Tue, 20 Sep 2016 10:13:41 +0200 [thread overview]
Message-ID: <20160920081341.GA2328@salvia> (raw)
In-Reply-To: <a6f9f673-8c5b-4a95-ea38-4fb8b39d4dc8@c-s.fr>
On Fri, Sep 16, 2016 at 06:50:22PM +0200, Christophe Leroy wrote:
> Hi
>
> I tried to limit ping flooding by setting the following rule:
>
> nft add rule filter input icmp type echo-request limit rate 10/second accept
This is matching packets under the rate, so packets under the rate are
accepted.
Your next rule, or default policy, should drop, so packets over the
rate are dropped.
You can invert this logic via:
# nft add rule filter input icmp type echo-request limit rate over 10/second drop
Does this work for you?
Thanks.
next prev parent reply other threads:[~2016-09-20 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 16:50 rate limit not working ? Christophe Leroy
2016-09-20 8:13 ` Pablo Neira Ayuso [this message]
2016-09-20 11:14 ` Christophe Leroy
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=20160920081341.GA2328@salvia \
--to=pablo@netfilter.org \
--cc=christophe.leroy@c-s.fr \
--cc=netfilter-devel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).