add fail2ban config
Some checks failed
/ deploy (push) Failing after 8s

This commit is contained in:
toufic ar 2026-01-29 17:41:53 +02:00
parent 3adab363e0
commit 1d717b862e
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k
3 changed files with 19 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{...}: { {
imports = [ imports = [
./disks.nix ./disks.nix
./hardware-configuration.nix ./hardware-configuration.nix
@ -9,6 +9,7 @@
./nvim ./nvim
./http ./http
./search ./search
./security
]; ];
system.stateVersion = "25.05"; system.stateVersion = "25.05";
} }

View file

@ -0,0 +1,3 @@
{
imports = [./fail2ban.nix];
}

View file

@ -0,0 +1,14 @@
{
services.fail2ban = {
enable = true;
maxretry = 5;
bantime = "6h";
bantime-increment = {
enable = true;
formula = "ban.Time * math.exp(float(ban.Count+1)*banFactor)/math.exp(1*banFactor)";
multipliers = "1 2 4 8 16 32 64";
rndtime = "6h";
overalljails = true;
};
};
}