With this script you can block those ips that are overloading your system.
The script has comments explaining everything it does, you just have to read if what is commented with a # and if you are interested in deleting that pad to uncomment it.
In case you do not weigh modify the script to allow other ports, contact me.
The script has comments explaining everything it does, you just have to read if what is commented with a # and if you are interested in deleting that pad to uncomment it.
bash anti-ddos.sh
- 53 TCP/UDP
- 80 TCP
- 443 TCP
- 110 TCP
- 143 TCP
- 995 TCP
- 25 TCP
- 22 TCP
- 21 TCP
Do you want to modify the ports to allow others that are not indicated there?
1. We will go to line 290 of the script
2. We will copy this line of code and change PROTOCOL for the protocol that we want to change udp or tpc then PORT for the port we want to change.
1. We will go to line 290 of the script
2. We will copy this line of code and change PROTOCOL for the protocol that we want to change udp or tpc then PORT for the port we want to change.
Bash:
$IPTABLES -A OUTPUT -m state --state NEW -p PROTOCOL --dport PORT -j ACCEPT
In case you do not weigh modify the script to allow other ports, contact me.