Compare commits
2 Commits
1ef8a39613
...
26853a4200
Author | SHA1 | Date | |
---|---|---|---|
26853a4200 | |||
88b6b6e2ab |
@ -180,15 +180,37 @@
|
||||
};
|
||||
systemd.coredump.enable = false;
|
||||
|
||||
# Users
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.LogLevel = "VERBOSE";
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
settings.X11Forwarding = false;
|
||||
extraConfig = "StreamLocalBindUnlink yes";
|
||||
ports = [ 22 ];
|
||||
ports = [ 32323 ];
|
||||
};
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 3;
|
||||
bantime = "2h";
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
maxtime = "72h";
|
||||
overalljails = true;
|
||||
};
|
||||
ignoreIP = [
|
||||
"10.0.0.0/8"
|
||||
"172.16.0.0/12"
|
||||
"192.168.0.0/16"
|
||||
];
|
||||
jails = {
|
||||
sshd.settings = {
|
||||
backend = "systemd";
|
||||
mode = "aggressive";
|
||||
};
|
||||
};
|
||||
};
|
||||
# Users
|
||||
users.mutableUsers = false;
|
||||
users.users = {
|
||||
${config.mainuser} = {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user