make sure web ports are allowed

This commit is contained in:
Joakim Repomaa
2025-02-07 18:16:16 +02:00
committed by Joakim Repomaa
parent e2f8d1eeff
commit 5c456d4a50
3 changed files with 7 additions and 10 deletions

View File

@@ -121,11 +121,10 @@
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
}; };
# Open ports in the firewall. modules.firewall = {
networking.firewall.allowedTCPPorts = [ 22 ]; enable = true;
# networking.firewall.allowedUDPPorts = [ ... ]; allInterfaces = [ "ssh" ];
# Or disable the firewall altogether. };
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you

View File

@@ -17,10 +17,8 @@
virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.backend = "podman";
networking.firewall = { networking.firewall.trustedInterfaces = [ "podman1" ];
trustedInterfaces = [ "podman1" ]; modules.firewall.interfaces.podman1 = [ "dns" ];
interfaces.podman1.allowedUDPPorts = [ 53 ];
};
modules.webserver.enable = true; modules.webserver.enable = true;

View File

@@ -94,6 +94,6 @@ in
}; };
}; };
modules.firewall.allInterfaces = lib.mkDefault [ "web" ]; modules.firewall.allInterfaces = [ "web" ];
}; };
} }