All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Gil <rgil@bodybuildingdiscount.com>
To: netfilter@lists.netfilter.org
Subject: ICMP, SYN, ACK flooding
Date: Fri, 05 Dec 2003 17:11:10 -0500	[thread overview]
Message-ID: <3FD1027E.70007@bodybuildingdiscount.com> (raw)

In this script for iptables i cant seem to get the icmp flood protection 
to work. Im limiting the icmp to 1/s and a burst of 4... (under ping of 
death), same goes for syn flood allthough im not quite sure how to test 
syn/ack/fin/xmas flooding. And how can i go about closing all ports to 
syn packets except the ones listed so i dont have the responding. 
Perhaps i have some things in the wrong order. Any help would be great.
                                                                        
              ~Rob Gil
#######################################################
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

iptables -A INPUT -j ACCEPT -p tcp --dport 21
iptables -A INPUT -j ACCEPT -p tcp --dport 22
iptables -A INPUT -j ACCEPT -p tcp --dport 25
iptables -A INPUT -j ACCEPT -p tcp --dport 80
iptables -A INPUT -j ACCEPT -p tcp --dport 110
iptables -A INPUT -j ACCEPT -p tcp --dport 443

iptables -A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p udp -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP

# Flood Protection
# SYN
iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
                                                                                                      

# Port Scan
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit \
--limit 1/s  -j ACCEPT
                                                                                                      

# Ping Of Death
iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 
1/s \ --limit-burst 4 -j ACCEPT

#ICMP REQ (ECHO)
#iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
                                                                                

#ICMP REP (ECHO)
#iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT

# Refuse Loopback From Outside
iptables -A INPUT -i eth0 -d 127.0.0.0/8 -j DROP
# Kill Fragments
#iptables -A INPUT -i eth0 -f -j LOG --log-level debug --log-prefix 
"IPTABLES \ FRAGMENTS: "
iptables -A INPUT -i eth0 -f -j DROP

echo 1 > /proc/sys/net/ipv4/ip_forward





             reply	other threads:[~2003-12-05 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05 22:11 Robert Gil [this message]
2003-12-05 22:21 ` ICMP, SYN, ACK flooding Antony Stone
2003-12-05 22:29   ` Antony Stone
2003-12-05 22:33 ` Jeffrey Laramie

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=3FD1027E.70007@bodybuildingdiscount.com \
    --to=rgil@bodybuildingdiscount.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 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.