From dc86e970e772855d3875e731b3624188259df1a1 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 23 Aug 2024 23:47:22 -0700 Subject: [PATCH] networking: open firewall ports for grim dawn --- modules/nixos/networking/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/nixos/networking/default.nix b/modules/nixos/networking/default.nix index 33589a8..b859215 100755 --- a/modules/nixos/networking/default.nix +++ b/modules/nixos/networking/default.nix @@ -1,6 +1,19 @@ -{ +let + universalAllowedPorts = [27016 42805]; + universalAllowedRanges = [ + { + from = 42852; + to = 42872; + } + ]; +in { services.openssh.enable = true; - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; + networking.firewall = { + allowedTCPPorts = universalAllowedPorts; + allowedUDPPorts = universalAllowedPorts; + allowedUDPPortRanges = universalAllowedRanges; + allowedTCPPortRanges = universalAllowedRanges; + }; + networking.firewall.enable = true; networking.nameservers = ["1.1.1.1" "1.0.0.1"]; }