Add fail2ban to sshd module
This commit is contained in:
parent
b3ec023cad
commit
b441618575
1 changed files with 11 additions and 5 deletions
|
|
@ -3,11 +3,17 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.openssh = {
|
services = {
|
||||||
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
fail2ban = {
|
||||||
|
enable = true;
|
||||||
|
bantime = "1h";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue