From: "Neal P. Murphy" <neal.p.murphy@alum.wpi.edu>
To: netfilter@vger.kernel.org
Subject: Re: iptables TCP DDoS filtering
Date: Tue, 5 Jul 2016 16:51:26 -0400 [thread overview]
Message-ID: <20160705165126.7ecb9885@playground> (raw)
In-Reply-To: <loom.20160705T084958-392@post.gmane.org>
On Tue, 5 Jul 2016 06:53:07 +0000 (UTC)
Josh Day <conna666@gmail.com> wrote:
> I'm curious if anyone of you has read this article
> https://javapipe.com/iptables-ddos-protection and tried any of the
> rules/settings. I read it today but I'm not sure what to make of it, so
> thought you guys could maybe share your opinion.
The *first* rule in PREROUTING should drop INVALID packets (the rule should use '-I PREROUTING'). It makes no sense to waste one extra CPU cycle processing them. This should be standard on all firewalls.
In TCP, I think only a SYN packet can be NEW; all other TCP packets for non-established (or maybe non-seen) conns are supposed to be INVALID because they cannot be matched to a tracked conn.
Dropping all ICMP packets is wrong; ICMP is required for TCP/IP to work properly. And to drop only ICMP ECHO packets, it's better to use the kernel function that does that earlier: "echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all".
The rules to drop private, documentation, LL and mcast addresses are too inclusive as written. That is, they drop such packets from all interfaces; they should only drop packets from the internet-facing interface(s). Only the rule that handles 127/8 is reasonably right.
N
next prev parent reply other threads:[~2016-07-05 20:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 6:53 iptables TCP DDoS filtering Josh Day
2016-07-05 19:08 ` alvin.ml
2016-07-06 7:07 ` John Wayne
2016-07-06 15:16 ` alvin.ml
2016-07-05 20:51 ` Neal P. Murphy [this message]
2016-07-06 8:29 ` Antonio Prado
2016-07-06 14:21 ` alvin.ml
2016-07-06 15:36 ` Antonio Prado
2016-07-06 17:45 ` alvin.ml
2016-07-06 19:13 ` Neal P. Murphy
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=20160705165126.7ecb9885@playground \
--to=neal.p.murphy@alum.wpi.edu \
--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 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.