Anti Layer-7 DDoS On Centos - without 5 seconds when entering the site

Anti Layer-7 DDoS On Centos
Install Iptables Service in CentOS
yum install iptables
iptables-save > /etc/sysconfig/iptables
service iptables start
chkconfig iptables on
Now we will add rules that will detect the attack

sudo iptables -A INPUT -p tcp --syn --dport 80 -m state --state NEW -m recent --set

sudo iptables -A INPUT -p tcp --syn --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 --rttl -j DROP

Now save the new rules that you add with the command :

service iptables save

For layer-4 protection just put cloudflare.

Thats all, enjoy guys!

s
Thanked by 1lph
Sign In or Register to comment.