This commit is contained in:
Daylin Morgan 2023-08-07 11:19:38 -05:00
parent 7d77335e21
commit 3baa9f9b4f
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -29,11 +29,12 @@
# fail2ban config based on:
# https://www.linode.com/docs/guides/how-to-use-fail2ban-for-ssh-brute-force-protection/
services.fail2ban {
services.fail2ban = {
enable = true;
maxretry = 5;
bantime = "24h";
jails = {
jails =
{
sshd = ''
port = ssh
filter = sshd
@ -41,10 +42,10 @@
maxretry = 3
findtime = 300
bantime = 3600
ignoreip = 127.0.0.1
''
}
}
'';
};
};
boot.kernelPackages = pkgs.linuxPackages_latest;
# TODO: convert this to a systemd service/timer
@ -145,5 +146,5 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
}
}