From c84a24c2ac6bf8159b213aab4896af36e2839564 Mon Sep 17 00:00:00 2001 From: kity Date: Fri, 27 Dec 2024 14:34:19 +0100 Subject: [PATCH] added ssh jail --- features/shared/ssh.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/features/shared/ssh.nix b/features/shared/ssh.nix index ed78121..4400ec3 100644 --- a/features/shared/ssh.nix +++ b/features/shared/ssh.nix @@ -8,4 +8,14 @@ PermitRootLogin = "no"; }; }; + + services.fail2ban.jails.sshd.settings = { + ssh = '' + enabled = true + port = ssh + filter = sshd + logpath = %(sshd_log)s + maxretry = 5 + ''; + }; }