Zum Inhalt springen

Fail2ban/SSH

Aus Foxwiki
Version vom 3. November 2025, 11:56 Uhr von DanielZorin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Konfiguration == * Erstellen Sie die Datei sshd.conf in /etc/fail2ban/jail.d/ <syntaxhighlight lang="ini" copy line> [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"] </syntaxhighlight> * Fail2ban-Dienst neu starten <syntaxhighlight lang="bash" highlight="1" copy line> sudo systemctl restart fail2ban </synta…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

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