From 5e6114ecc4ef22cf9c593ec42f8df781edd16ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ta=C5=9Fdelen?= Date: Fri, 2 Aug 2019 08:40:10 +0300 Subject: [PATCH] Update anti-ddos.sh --- anti-ddos.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/anti-ddos.sh b/anti-ddos.sh index 58c5198..f5ebc5d 100644 --- a/anti-ddos.sh +++ b/anti-ddos.sh @@ -439,6 +439,21 @@ $IPTABLES -A FORWARD -j REJECTLOG # You should check/test that the firewall really works, using # iptables -vnL, nmap, ping, telnet, ... +# Appending rules : Let’s add some more IPv6 rules to our firewall. + +sudo ip6tables -A INPUT -p tcp --dport ssh -s HOST_IPV6_IP -j ACCEPT +sudo ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT +sudo ip6tables -A INPUT -p tcp --dport 21 -j ACCEPT +sudo ip6tables -A INPUT -p tcp --dport 25 -j ACCEPT + +# To see the IPv6 rules with line numbers, type the following command: + +sudo ip6tables -L -n --line-numbers + +# Deleting rules + +sudo ip6tables -D INPUT -p tcp --dport 21 -j ACCEPT + # Exit gracefully. #------------------------------------------------------------------------------