Minecraft LAN world & Firewalld

I block all Firewall ports by default, and that made Minecraft LAN worlds not work anymore.

Apart from that it is basically Microsoft Hell and I will probably play Minetest+Mineclone2.

I found what ports are needed to make LAN worlds work:

sudo firewall-cmd --zone=internal --add-port={5000,25565}/{udp,tcp} --permanent
sudo firewall-cmd --reload

Or add the Port 25565 and another one through the Firewall GUI, for TCP and UDP.

I think on Fedora apps can’t open ports themselves, 25565 is always needed, the other port is manually defined in the game, you always need to use the one you chose.

But I still can’t discover the server in “local available servers”, connecting through IP works perfectly. Anyone know how to add this?

Using the Flathub Flatpak.

You can identify the ports like this:

  • List open sockets and filter by the process name.
  • Capture and analyze the traffic while the firewall is stopped.