aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-05-17 11:46:09 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-05-17 11:46:09 +0530
commita476214142b010becbd0b780e7fd1b9a4460cc99 (patch)
tree3a3b3258bace5d4911c3f781a5a04cf45477eb60 /nixos
parent74d75a040d1a30e44737aec5afb5dacc67ebdb82 (diff)
minecraft firewall drop
Diffstat (limited to 'nixos')
-rw-r--r--nixos/apps.nix4
-rw-r--r--nixos/games/minecraft.nix12
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; }
+ ];
+ };
}