From: Phil Oester <kernel@linuxace.com>
To: podo <podo@hnup.de>
Cc: 'netfilter' <netfilter@vger.kernel.org>
Subject: Re: Limit rule for ICMP not working properly?
Date: Thu, 5 Sep 2013 11:23:59 -0700 [thread overview]
Message-ID: <20130905182359.GA20267@linuxace.com> (raw)
In-Reply-To: <000a01ceaa4e$bd406c90$37c145b0$@hnup.de>
On Thu, Sep 05, 2013 at 05:43:59PM +0200, podo wrote:
> Hi Phil,
> Yes, I ment the 3th rule (Established accept).
>
> Please what do you mean by "same ID" ? And is this not exactly the problem ?
> nf_conntrack is even not needed, when only the first rule is present:
> -A INPUT -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j ACCEPT
By "ID" I mean ICMP ID. Do some testing on your own with something like this:
while : ; do grep icmp /proc/net/nf_conntrack ; sleep 1 ; done
while you have a ping going. You'll note that as long as the ICMP ID (and
src/dst IPs) are identical, only one conntrack entry is utilized. If you continually
ping, the only update will be the timer refreshing to 30 seconds. During this time,
you will note your "established" rule increasing. If you ping 5 times, the established
rule should register 4 hits.
If you allow the conntrack to expire (by waiting 30 seconds), then the cycle starts
over again.
> ICMP should not be tracked as established...
> In my opinion the behaviour is not correct.
This is optimal behavior. Also, without this, DoS attacks against conntrack
would be much simpler.
Phil
next prev parent reply other threads:[~2013-09-05 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 16:55 Limit rule for ICMP not working properly? podo
[not found] ` <CAKpaJ1wgnikpc9WcwCVgzf45F1Lpwbp9LMr4_2bXk6XYf7nRjw@mail.gmail.com>
2013-09-05 14:58 ` podo
2013-09-05 15:11 ` Phil Oester
2013-09-05 15:43 ` podo
2013-09-05 18:23 ` Phil Oester [this message]
2013-09-06 0:10 ` Humberto Jucá
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=20130905182359.GA20267@linuxace.com \
--to=kernel@linuxace.com \
--cc=netfilter@vger.kernel.org \
--cc=podo@hnup.de \
/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.