@@ -1,15 +1,27 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
PrintMotd = false;
|
||||
};
|
||||
environment = {
|
||||
enableAllTerminfo = true;
|
||||
persistence."/persist"."/var/lib/fail2ban" = { };
|
||||
};
|
||||
|
||||
environment.enableAllTerminfo = true;
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PrintMotd = false;
|
||||
};
|
||||
};
|
||||
|
||||
fail2ban = {
|
||||
enable = true;
|
||||
bantime = "24h";
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
maxtime = "720h";
|
||||
overalljails = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user