summaryrefslogtreecommitdiff
path: root/common/fail2ban.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/fail2ban.nix')
-rw-r--r--common/fail2ban.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/fail2ban.nix b/common/fail2ban.nix
new file mode 100644
index 0000000..0670df5
--- /dev/null
+++ b/common/fail2ban.nix
@@ -0,0 +1,13 @@
+{
+ services.fail2ban = {
+ enable = true;
+ maxretry = 5;
+ bantime = "24h";
+ bantime-increment = {
+ enable = true;
+ formula = "ban.Time * math.exp(float(ban.Count+1)*banFactor)/math.exp(1*banFactor)";
+ rndtime = "12h";
+ overalljails = true;
+ };
+ };
+}