From: ASHISH <ashishis@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: --limit 5/m doesn't work
Date: Wed, 23 Mar 2005 23:56:33 +0530 [thread overview]
Message-ID: <558224e305032310262146144c@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0503230853200.5803@localhost.localdomain>
I believe that's true. Even i did check that through logging when was
about to present this to my students in network security course. This
is coarsely analogous to a tap that leaks in a bucket every fixed
amount of time in order to fill it, but the bucket rejects the new
drops when it is full.
On Wed, 23 Mar 2005 08:59:11 -0500 (EST), Robert P. J. Day
<rpjday@mindspring.com> wrote:
> On Wed, 23 Mar 2005, Jason Opperisano wrote:
>
> > On Wed, 2005-03-23 at 03:21, ASHISH wrote:
> > > The rule that you have mentioned will "Accept" the first five matches.
> >
> > to split hairs here--the way the OP has the rule written:
> >
> > iptables -A INPUT -i eth0 -m limit --limit 5/m --limit-burst 5 -j ACCEPT
> >
> > it will actually accept the first 10 packets, the limit of 5 + the burst
> > of 5--then the limit will enforce for 5 minutes.
>
> huh? i'm pretty sure that's not true, as i remember figuring this out
> once upon a time. i'll go back to my notes but, as i *remember* it,
> it's easiest to think in terms of tokens. "limit-burst" means you get
> that many tokens with which to "pay" to accept incoming packets. if
> you start with a limit burst of, say, 20, then you can accept the
> first 20 packets, regardless of how fast they arrive -- they just cost
> you all of your tokens almost immediately.
>
> the "limit" of 5/m means that you are replenished with another token
> at that rate -- effectively every 12 seconds -- but only up to your
> limit-burst maximum of 20.
>
> what this means is that, if you're getting just hammered, when you
> start, you'll accept the first 20 packets and, after that, another one
> every 12 seconds. if things quiet down, then you're allowed to build
> up your reserve of tokens again, but only up to your burst-limit.
>
> i actually set up a set of rules once and *watched* this happen.
>
> does that make sense?
>
> rday
>
>
--
cheers
Ashish
next prev parent reply other threads:[~2005-03-23 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-23 2:56 --limit 5/m doesn't work Andy Samuel
[not found] ` <558224e30503222255158832bc@mail.gmail.com>
2005-03-23 8:21 ` ASHISH
2005-03-23 13:44 ` Jason Opperisano
2005-03-23 13:59 ` Robert P. J. Day
2005-03-23 14:16 ` Jason Opperisano
2005-03-23 18:26 ` ASHISH [this message]
2005-03-23 18:57 ` Robert P. J. Day
2005-03-23 18:36 ` Grant Taylor
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=558224e305032310262146144c@mail.gmail.com \
--to=ashishis@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox