Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi2:fail2ban

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
Letzte Überarbeitung Beide Seiten, nächste Überarbeitung
lpi2:fail2ban [2016/12/09 12:22]
ingo_wichmann
lpi2:fail2ban [2018/02/02 11:03]
ingo_wichmann
Zeile 4: Zeile 4:
 Per default überwacht fail2ban bei debian ssh: Per default überwacht fail2ban bei debian ssh:
  
-  ​grep -A7 '\[ssh\]' /​etc/​fail2ban/​jail.conf+  ​egrep -A7 '\[sshd?\]' /​etc/​fail2ban/​jail.conf
   less /​etc/​fail2ban/​filter.d/​sshd.conf   less /​etc/​fail2ban/​filter.d/​sshd.conf
  
Zeile 16: Zeile 16:
  
   less /​etc/​fail2ban/​action.d/​iptables-multiport.conf   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
 +
 +<file txt /​etc/​apache2/​conf-available/​fail2ban-apache-auth-test.conf>​
 +<​directory /​srv/​www/​fail2ban>​
 +  AllowOverride AuthConfig
 +  AuthType ​       Basic
 +  AuthName ​       "Bitte Username und Passwort"​
 +  AuthBasicProvider file
 +  AuthUserFile ​   /​srv/​www/​htpasswd_fail2ban
 +  Require ​        ​valid-user
 +</​directory>​
 +</​file>​
 +
 +<file html /​srv/​www/​fail2ban/​index.html>​
 +<​html>​
 +  <​head>​
 +    <​title>​Hello fail2ban!</​title>​
 +  </​head>​
 +  <​body>​
 +    Hello fail2ban
 +  </​body>​
 +</​html>​
 +</​file>​
 +
 +Zugriff lokal testen:
 +  wget --user heinz --password xxx -nv -O - http://​127.0.0.1/​fail2ban-test/​index.html
 +
 +<file txt /​etc/​fail2ban/​jail.local>​
 +[apache-auth]
 +enabled = true
 +</​file>​
 +
 +  fail2ban-client reload
 +  fail2ban-client status
 +  fail2ban-client status sshd
  
lpi2/fail2ban.txt · Zuletzt geändert: 2018/02/02 11:16 von ingo_wichmann