add fail2ban on ssh

This commit is contained in:
RingOfStorms (Josh) 2024-07-09 17:32:02 -05:00
parent d273fb360d
commit 72af92c4eb

View file

@ -1,10 +1,19 @@
{ ... }:
{
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
# Use fail2ban
services.fail2ban = {
enable = true;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
22 # sshd
];
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
logLevel = "VERBOSE";
settings.PermitRootLogin = "yes";
};
}