I think my flake needs a complete rewrite
This commit is contained in:
parent
87fbcda3d3
commit
65f90a0bf3
65 changed files with 110 additions and 125 deletions
16
modules/system/services/common/ssh/default.nix
Normal file
16
modules/system/services/common/ssh/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fail2ban
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PrintLastLog = "no";
|
||||
PasswordAuthentication = false;
|
||||
UsePAM = false;
|
||||
};
|
||||
};
|
||||
}
|
9
modules/system/services/common/ssh/fail2ban/default.nix
Normal file
9
modules/system/services/common/ssh/fail2ban/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 5;
|
||||
bantime = "5m";
|
||||
ignoreIP = [ "${outputs.ips.localSpan}.0/24" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue