This commit is contained in:
parent
3adab363e0
commit
1d717b862e
3 changed files with 19 additions and 1 deletions
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
config/security/default.nix
Normal file
3
config/security/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
imports = [./fail2ban.nix];
|
||||||
|
}
|
||||||
14
config/security/fail2ban.nix
Normal file
14
config/security/fail2ban.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue