Finally switch to flakes.
This commit is contained in:
parent
a90e09db74
commit
5e0b713756
116 changed files with 5443 additions and 3 deletions
21
nixos/services/openssh.nix
Normal file
21
nixos/services/openssh.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
# Enable SSH
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PrintLastLog = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Block nefarious SSH connections
|
||||
fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 5;
|
||||
bantime = "5m";
|
||||
ignoreIP = [ "10.0.0.0/24" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue