From: "Edmund Turner" <eturner@monash.edu.my>
To: 'Jim Carter' <jimc@math.ucla.edu>
Cc: netfilter@lists.netfilter.org
Subject: RE: ICMP floods
Date: Thu, 16 Oct 2003 10:38:09 +0800 [thread overview]
Message-ID: <02fc01c3938e$8b13de00$de0018ac@admin.monash.edu.my> (raw)
In-Reply-To: <Pine.LNX.4.53.0310150920031.15987@simba.math.ucla.edu>
Jim, Thanks for the tip!. I just noticed that I missed the 'J'. Ive
rewritten the rules as you advised.
Regards
edmund
-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Jim Carter
Sent: Thursday, October 16, 2003 12:36 AM
To: Edmund Turner
Cc: netfilter@lists.netfilter.org
Subject: Re: ICMP floods
On Wed, 15 Oct 2003, Edmund Turner wrote:
> Im tyring to create a proper ICMP chain that will blocked ICMP
flooding
> by Viruses and DOS attacks. Would the ruleset below be sufficient?
> -- snip --
> /sbin/iptables -A ICMP -m limit -p ICMP -i eth2 --limit 1
--limit-burst 10
> /sbin/iptables -A ICMP -m limit -p ICMP -i eth1 --limit 1
--limit-burst 10
> /sbin/iptables -A ICMP -m limit -p ICMP -i eth0 --limit 1
--limit-burst 10
You need "-j SOMETHING" -- the limit module would bypass the -j action
if
it happened too often. The man page doesn't say the default unit for
--limit (but it says the default is 3/hour which is kind of
infrequent); I
would put in an explicit unit. Also I doubt you really need separate
rate
limiting on each interface. I see you have ACCEPT rules for every
different type of ICMP packet. Here's a real simple rule which does
almost the same thing:
iptables -t filter -A FORWARD -p ICMP -m limit --limit 2/second \
--limit-burst 10 -j ACCEPT
iptables -t filter -A FORWARD -p ICMP -m limit --limit 4/minute -j LOG
iptables -t filter -A FORWARD -P ICMP -j DROP
(Or you could put this in a separate chain like your example: probably
just
as efficient if not more so, and more readable.)
Hope this helps!
James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA
90095-1555
Email: jimc@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for
PGP key)
prev parent reply other threads:[~2003-10-16 2:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 3:54 ICMP floods Edmund Turner
2003-10-15 7:06 ` Alistair Tonner
2003-10-15 7:18 ` Michael Kearey
2003-10-15 7:29 ` Edmund Turner
2003-10-15 7:31 ` Alistair Tonner
2003-10-15 16:36 ` Jim Carter
2003-10-16 2:38 ` Edmund Turner [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='02fc01c3938e$8b13de00$de0018ac@admin.monash.edu.my' \
--to=eturner@monash.edu.my \
--cc=jimc@math.ucla.edu \
--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