From a476214142b010becbd0b780e7fd1b9a4460cc99 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Sun, 17 May 2026 11:46:09 +0530 Subject: minecraft firewall drop --- nixos/apps.nix | 4 ++-- nixos/games/minecraft.nix | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/apps.nix b/nixos/apps.nix index b8f6e9b..9918029 100644 --- a/nixos/apps.nix +++ b/nixos/apps.nix @@ -37,6 +37,6 @@ ]; }; - networking.firewall.allowedTCPPorts = [ 53317 8081 4173 3001 ]; - networking.firewall.allowedUDPPorts = [ 53317 8081 4173 3001 ]; + networking.firewall.allowedTCPPorts = [ 53317 41567 ]; + networking.firewall.allowedUDPPorts = [ 53317 41567 ]; } diff --git a/nixos/games/minecraft.nix b/nixos/games/minecraft.nix index 594f8bd..6507764 100644 --- a/nixos/games/minecraft.nix +++ b/nixos/games/minecraft.nix @@ -3,4 +3,16 @@ environment.systemPackages = with pkgs; [ prismlauncher ]; + + # you do need to enable all of the ports because minecraft LAN uses a fucking + # random one + networking.firewall = { + enable = true; + allowedTCPPortRanges = [ + { from = 1024; to = 65535; } + ]; + allowedUDPPortRanges = [ + { from = 1024; to = 65535; } + ]; + }; } -- cgit v1.2.3