Fail2ban auf Vserver

Eine einfachere Lösung sieht so aus, dass man einfach folgendes in die /etc/init.d/firewall einfügt:
Code:
## Block SSH brute force attacks
iptables -N brute_force
iptables -F brute_force
iptables -A brute_force -m state --state NEW -m recent --name attack --set
iptables -A brute_force -m recent --name attack --rcheck --seconds 120 --hitcount 3 -m limit --limit 2/minute --limit-burst 1 -j LOG --log-prefix 'SSH brute force attack '
iptables -A brute_force -m recent --name attack --rcheck --seconds 120 --hitcount 3 -j DROP
iptables -A brute_force -j ACCEPT
## Open SSH port
iptables -A INPUT -p tcp --syn --dport 22 -j brute_force
#iptables -A INPUT -p udp --syn --dport 5060 -j brute_force
Habe es aber selbst noch nicht getestet. Das ist eigentlich nur für SSH, aber lässt sich bestimmt irgendwie auch für Asterisk nutzen.
 
Kostenlos!

Statistik des Forums

Themen
247,304
Beiträge
2,266,332
Mitglieder
375,903
Neuestes Mitglied
Atemi1991