diff --git a/hosts/modules/alexandria/networking.nix b/hosts/modules/alexandria/networking.nix index f518b12..2b85a18 100644 --- a/hosts/modules/alexandria/networking.nix +++ b/hosts/modules/alexandria/networking.nix @@ -6,11 +6,10 @@ allowedTCPPorts = [ 80 # HTTP 443 # HTTPS - 25565 # Minecraft + # 25565 # Minecraft ]; allowedUDPPorts = [ - 24454 # Minecraft Simple Voice Chat - 25565 # Minecraft + # 25565 # Minecraft ]; }; }; diff --git a/hosts/modules/trantor/default.nix b/hosts/modules/trantor/default.nix index a23030f..9bdb292 100644 --- a/hosts/modules/trantor/default.nix +++ b/hosts/modules/trantor/default.nix @@ -5,5 +5,6 @@ ./boot.nix ./disko.nix ./hardware-configuration.nix + ./networking.nix ]; } diff --git a/hosts/modules/trantor/networking.nix b/hosts/modules/trantor/networking.nix new file mode 100644 index 0000000..6de3d0c --- /dev/null +++ b/hosts/modules/trantor/networking.nix @@ -0,0 +1,35 @@ +{ ... }: + +{ + networking = { + firewall = { + allowedTCPPorts = [ 25565 ]; + allowedUDPPorts = [ + 25565 + 19132 + ]; + }; + nat = { + enable = true; + externalInterface = "enp0s6"; + internalInterfaces = [ "tailscale0" ]; + forwardPorts = [ + { + sourcePort = 25565; + proto = "tcp"; + destination = "alexandria:25565"; + } + { + sourcePort = 25565; + proto = "udp"; + destination = "alexandria:25565"; + } + { + sourcePort = 19132; + proto = "udp"; + destination = "alexandria:19132"; + } + ]; + }; + }; +}