Hallo,
Ich habe einen KVM Root-Server hier und habe schon einiges probiert um Fail2Ban zum Laufen zu bekommen. Auf meinem Server läuft Debian Wheezy. Fail2Ban ist eingerichtet, jedoch werden die IPs nach einer gewissen Anzahl nicht gesperrt. Im Fail2Ban Log wird zwar schön mitprotokolliert, dass eine IP gesperrt wurde (bzw. dass eine IP bereits gesperrt ist), jedoch passiert nichts weiter.
iptables -L zeigt mir, dass die IP (die gesperrt werden sollte) auch schön dort eingetragen wurde:
Code
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-dovecot tcp -- anywhere anywhere multiport dports smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
fail2ban-postfix tcp -- anywhere anywhere multiport dports smtp,ssmtp
fail2ban-apache tcp -- anywhere anywhere multiport dports http,https
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:6616
ACCEPT tcp -- anywhere anywhere tcp spt:6616
DROP tcp -- anywhere anywhere tcp spt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-apache (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-dovecot (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-postfix (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-ssh (1 references)
target prot opt source destination
DROP all -- 77.119.251.238.static.drei.at anywhere
RETURN all -- anywhere anywhere
root@taurus:/etc/fail2ban# nano /var/log/fail2ban.log
root@taurus:/etc/fail2ban# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-dovecot tcp -- anywhere anywhere multiport dports smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
fail2ban-postfix tcp -- anywhere anywhere multiport dports smtp,ssmtp
fail2ban-apache tcp -- anywhere anywhere multiport dports http,https
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:6616
ACCEPT tcp -- anywhere anywhere tcp spt:6616
DROP tcp -- anywhere anywhere tcp spt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-apache (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-dovecot (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-postfix (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain fail2ban-ssh (1 references)
target prot opt source destination
DROP all -- XXXXXXX.static.blah.blah.at anywhere
RETURN all -- anywhere anywhere
Alles anzeigen
Hat jemand eine Idee warum das so ist? Was muss ich noch ändern? Ich habe mir die Actions von Fail2Ban angeschaut und dort wird auch schön der Parameter -I verwendet, damit dieser priorisiert wird.