infra/config/network.nix

24 lines
532 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;
openssh = {
enable = true;
ports = [22];
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;
PermitRootLogin = "no";
StreamLocalBindUnlink = "yes";
};
2023-05-06 06:49:46 +02:00
};
};
}