Pakete:
* Debian (ab 7): ''fail2ban''
Per default überwacht fail2ban bei debian ssh:
egrep -A7 '\[sshd?\]' /etc/fail2ban/jail.conf
less /etc/fail2ban/filter.d/sshd.conf
…
[DEFAULT]
…
banaction = iptables-multiport
…
less /etc/fail2ban/action.d/iptables-multiport.conf
fail2ban Zusammenfassung der Konfiguration anzeigen:
fail2ban-client status
fail2ban-client status sshd
====== Apache Basic Auth ======
Pakete: apache2 fail2ban (Debian 9)
mkdir -p /srv/www/fail2ban
htpasswd -c /srv/www/htpasswd_fail2ban heinz
AllowOverride AuthConfig
AuthType Basic
AuthName "Bitte Username und Passwort"
AuthBasicProvider file
AuthUserFile /srv/www/htpasswd_fail2ban
Require valid-user
Hello fail2ban!
Hello fail2ban
Zugriff lokal testen:
wget --user heinz --password xxx -nv -O - http://127.0.0.1/fail2ban-test/index.html
[apache-auth]
enabled = true
fail2ban-client reload
fail2ban-client status
fail2ban-client status apache-auth
Von einem anderen Rechner aus:
ab -n 10 -A heinz:nono http://192.168.212.11/fail2ban-test/index.html
less /var/log/fail2ban.log