From f1060fdb523ade7f6bf3158a899e2a5f743dbf3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 20 Jul 2024 12:16:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(cesium/services)=20add=20alightwei?= =?UTF-8?q?ght=20fail2ban?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/cesium/services/default.nix | 1 + hosts/cesium/services/fail2ban.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 hosts/cesium/services/fail2ban.nix diff --git a/hosts/cesium/services/default.nix b/hosts/cesium/services/default.nix index f1270a0..3580388 100644 --- a/hosts/cesium/services/default.nix +++ b/hosts/cesium/services/default.nix @@ -6,6 +6,7 @@ ./gitea ./nginx ./ssh + ./fail2ban.nix ]; networking.firewall = { diff --git a/hosts/cesium/services/fail2ban.nix b/hosts/cesium/services/fail2ban.nix new file mode 100644 index 0000000..34f81f7 --- /dev/null +++ b/hosts/cesium/services/fail2ban.nix @@ -0,0 +1,7 @@ +{...}: { + services.fail2ban = { + enable = true; + maxretry = 3; + bantime = "10m"; + }; +}