JABZ7SHOP : Web Selling Things With Cheap Price : https://jabz7shop.blogspot.com/ : Go To My Shop Online Now
Bài đăng

Anti DDOS Cường Độ Nhẹ Với iptables Trên Centos

1 min read

 Tạo 1 file .sh với nội dung sau:

iptables -F
sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT
service iptables save
service iptables reload

Lệnh trên nghĩa là khi IP silent đạt tới 100 kết nối tới Server thì bắt đầu hạn chế cho phép 25 kết nối trong 1 phút. Nếu kết nối nhiều hơn sẽ bị block.

CHMOD 777 rồi chạy ./filename.sh là xong

00:00 / 00:00

Bạn có thể thích những bài đăng này

Đăng nhận xét