Make firewall use actual ports in use

main
Carsten Kragelund 2023-05-10 05:36:49 +02:00
parent 3fb452b00e
commit 71707b0357
Signed by: nyx
GPG Key ID: CADDADEEC9F753C0
2 changed files with 3 additions and 3 deletions

@ -50,5 +50,5 @@
owner = config.systemd.services.gitea.serviceConfig.User;
};
};
networking.firewall.allowedTCPPorts = [ 3000 ];
networking.firewall.allowedTCPPorts = [ config.services.gitea.settings.server.HTTP_PORT ];
}

@ -1,7 +1,7 @@
{ ... }: {
{ config, ... }: {
services.openssh = {
enable = true;
permitRootLogin = "yes";
};
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedTCPPorts = config.services.openssh.ports;
}