Zum Inhalt springen

Fail2ban/SSH

Aus Foxwiki

Konfiguration

  • Erstellen Sie die Datei sshd.conf in /etc/fail2ban/jail.d/
[sshd]
enabled = true
backend = systemd
port = ssh
filter = sshd
logpath = %(sshd_log)s
maxretry = 5
findtime = 3m
bantime = 1h
action = iptables-multiport[name=sshd, port="ssh", chain="INPUT"]
  • Fail2ban-Dienst neu starten
sudo systemctl restart fail2ban