From 9a0f11d63c1347b89724a16b3339d5f80180fec2 Mon Sep 17 00:00:00 2001 From: willifan Date: Sun, 28 Jul 2024 17:51:58 +0200 Subject: [PATCH] added firewall --- hosts/Anton/default.nix | 1 + hosts/Anton/firewall.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 hosts/Anton/firewall.nix diff --git a/hosts/Anton/default.nix b/hosts/Anton/default.nix index 33a1cc8..5799720 100644 --- a/hosts/Anton/default.nix +++ b/hosts/Anton/default.nix @@ -5,6 +5,7 @@ ./disko.nix ./data.nix + ./firewall.nix ./gitea.nix ./hardware-configuration.nix diff --git a/hosts/Anton/firewall.nix b/hosts/Anton/firewall.nix new file mode 100644 index 0000000..104ab20 --- /dev/null +++ b/hosts/Anton/firewall.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + networking.firewall = { + enable = true; + allowedTCPPorts = [ 22 80 443 3000 ]; + allowedUDPPorts = [ 22 ]; + }; +}