From 8d8ad7a9f79ba88cc5b07e8f5f4d1a4cded4ff1b Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 25 Mar 2023 13:41:53 +0100 Subject: Feat(system/services/fail2ban): Add fail2ban This should clear the logs somewhat. --- system/services/fail2ban/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 system/services/fail2ban/default.nix (limited to 'system/services/fail2ban') diff --git a/system/services/fail2ban/default.nix b/system/services/fail2ban/default.nix new file mode 100644 index 0000000..5b5e9e7 --- /dev/null +++ b/system/services/fail2ban/default.nix @@ -0,0 +1,14 @@ +# vim: ts=2 +{...}: { + services.fail2ban = { + enable = true; + maxretry = 2; # ban after 2 failures + bantime-increment = { + enable = true; + rndtime = "8m"; + overalljails = true; + multipliers = "2 4 16 128 256"; + maxtime = "72h"; + }; + }; +} -- cgit 1.4.1