myputer specific changes
This commit is contained in:
parent
1d4189b040
commit
a448ce3f39
216 changed files with 544 additions and 24478 deletions
17
homes/modules/server/fail2ban.nix
Executable file
17
homes/modules/server/fail2ban.nix
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
{...}: {
|
||||
# simple fail2ban config (not production ready or anything though)
|
||||
# refer to: https://nixos.wiki/wiki/Fail2Ban
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
|
||||
maxretry = 5;
|
||||
bantime = "10m"; # 10 minute ban
|
||||
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";
|
||||
maxtime = "168h"; # dont ban for more than 1 week
|
||||
overalljails = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue