From 923fcd185ec9bbda3242f5584d4b04a9a453ccc1 Mon Sep 17 00:00:00 2001 From: schererleander Date: Mon, 22 Sep 2025 10:42:00 +0200 Subject: feat: fix fail2ban sshd settings --- hosts/sachiel/configuration.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'hosts') diff --git a/hosts/sachiel/configuration.nix b/hosts/sachiel/configuration.nix index 3d87d26..18bcae7 100644 --- a/hosts/sachiel/configuration.nix +++ b/hosts/sachiel/configuration.nix @@ -1,6 +1,7 @@ { pkgs, host, + lib, username, ... }: @@ -57,16 +58,18 @@ services.fail2ban = { enable = true; + bantime = "1h"; jails = { - sshd = '' - enabled = true - port = 8693 - filter = sshd - backend = systemd - maxretry = 4 - findtime = 10m - bantime = 1h - ''; + sshd = { + enabled = true; + settings = { + port = 8693; + backend = "systemd"; + maxretry = 4; + findtime = "10m"; + bantime = "1h"; + }; + }; }; }; @@ -142,7 +145,7 @@ security.auditd.enable = true; networking.firewall = { - allowPing = false; + allowPing = false; allowedTCPPorts = [ 80 443 -- cgit v1.3.1