diff --git a/etc/fail2ban/jail.d/sshd-hardening.local b/etc/fail2ban/jail.d/sshd-hardening.local new file mode 100644 index 0000000..aa3d49e --- /dev/null +++ b/etc/fail2ban/jail.d/sshd-hardening.local @@ -0,0 +1,8 @@ +[sshd] +enabled = true +maxretry = 3 +findtime = 10m +bantime = 1h +bantime.increment = true +bantime.factor = 2 +bantime.maxtime = 1w diff --git a/etc/fail2ban/jail.d/sshd.local b/etc/fail2ban/jail.d/sshd.local new file mode 100644 index 0000000..efe4a16 --- /dev/null +++ b/etc/fail2ban/jail.d/sshd.local @@ -0,0 +1,10 @@ +[sshd] +enabled = true +backend = systemd +journalmatch = _SYSTEMD_UNIT=ssh.service + _COMM=sshd + _COMM=sshd-session +maxretry = 3 +findtime = 10m +bantime = 24h +bantime.increment = true +bantime.factor = 2 +bantime.maxtime = 7d