summary refs log tree commit diff stats
path: root/system/services/fail2ban
diff options
context:
space:
mode:
Diffstat (limited to 'system/services/fail2ban')
-rw-r--r--system/services/fail2ban/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/services/fail2ban/default.nix b/system/services/fail2ban/default.nix
index 949b486..5aee097 100644
--- a/system/services/fail2ban/default.nix
+++ b/system/services/fail2ban/default.nix
@@ -17,5 +17,14 @@
       multipliers = "2 4 16 128 256";
       maxtime = "72h";
     };
+    jails = {
+      dovecot = ''
+        # block IPs which failed to log-in
+        # aggressive mode add blocking for aborted connections
+        enabled = true
+        filter = dovecot[mode=aggressive]
+        maxretry = 2
+      '';
+    };
   };
 }