@@ -1,15 +1,27 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.openssh = {
|
environment = {
|
||||||
enable = true;
|
enableAllTerminfo = true;
|
||||||
ports = [ 22 ];
|
persistence."/persist"."/var/lib/fail2ban" = { };
|
||||||
openFirewall = true;
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PrintMotd = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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