summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-03-25 13:59:51 +0100
committerene <ene@sils.li>2023-03-25 13:59:51 +0100
commit1fc72de6b6606f6c97ccf9883a88705260dd3ac8 (patch)
treed6d25d0d16b1579f0255e149cc6a9afd084ebe63 /system
parentFeat(system/services/fail2ban): Add fail2ban (diff)
downloadnixos-server-1fc72de6b6606f6c97ccf9883a88705260dd3ac8.tar.gz
nixos-server-1fc72de6b6606f6c97ccf9883a88705260dd3ac8.zip
Fix(system/services/fail2ban): Make db persistent
Diffstat (limited to 'system')
-rw-r--r--system/services/fail2ban/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/system/services/fail2ban/default.nix b/system/services/fail2ban/default.nix
index 5b5e9e7..949b486 100644
--- a/system/services/fail2ban/default.nix
+++ b/system/services/fail2ban/default.nix
@@ -3,6 +3,13 @@
   services.fail2ban = {
     enable = true;
     maxretry = 2; # ban after 2 failures
+    daemonConfig = ''
+      [Definition]
+      logtarget = SYSLOG
+      socket    = /run/fail2ban/fail2ban.sock
+      pidfile   = /run/fail2ban/fail2ban.pid
+      dbfile    = /srv/fail2ban/fail2ban.sqlite3
+    '';
     bantime-increment = {
       enable = true;
       rndtime = "8m";