infra/config/network.nix

27 lines
610 B
Nix
Raw Normal View History

2023-05-06 06:49:46 +02:00
{
networking.firewall.enable = true;
2023-05-06 06:49:46 +02:00
services = {
fail2ban = {
enable = true;
bantime-increment.enable = true;
};
2023-05-06 06:49:46 +02:00
openssh = {
enable = true;
2024-09-18 18:22:22 +02:00
openFirewall = true;
settings = {
2024-09-13 18:46:54 +02:00
KexAlgorithms = [
"curve25519-sha256"
"curve25519-sha256@libssh.org"
"diffie-hellman-group16-sha512"
"diffie-hellman-group18-sha512"
"sntrup761x25519-sha512@openssh.com"
];
PasswordAuthentication = false;
2024-09-16 20:57:30 +02:00
PermitRootLogin = "prohibit-password";
StreamLocalBindUnlink = "yes";
};
2023-05-06 06:49:46 +02:00
};
};
}