Minecraft fails to connect to LAN server but can join public ones

Hi everyone,
I downloaded Minecraft to play on a LAN server my household has set up, only to run into some problems. Single-player mode works with no problems, and joining Hypixel (a public server) connected with no issues.

You can see LAN worlds in the multiplayer menu. But can’t connect to them - says “connection lost” or “connection timed out” - which is strange considering I have a 1 gigabit internet connection.

The LAN server was made on a Windows machine by starting a new world and choosing “enable LAN server”

I have tried opening the port used by the server on my laptop with firewalld-cmd, which didn’t help. Disabling the firewall entirely (stopping firewalld) and trying to connect also didn’t work. I’m not sure what to do next.

Are you sure the server is not ignoring the connection? If your laptop is allowing the connection through the firewall but still it doesn’t work, there is a good chance that the server is dropping the connection.

Tried again today and we managed to play together this time! One of two things fixed it:

  • I opened port 25565 on my laptop using firewall-cmd --permanent --zone=public --add-port=25565/tcp

  • Both computers were using wi-fi to connect to the network; previously the other laptop/server was connected over Ethernet.

Well if you were able to connect to online worlds, then it’s not your laptop firewall causing the issues because it’s the same port online. It may be something with how your network is configured.

I don’t mean your laptop network settings, but the network you’re connecting to. Some networking equipment have options to try and prevent devices on a local network to not find each other. This feature is used in public networks like at a Starbucks or McDonalds or wherever. When you say “Household” is this like a college dorm or frat house?

It’s a flat I share with my partner. My partner is the one who set up the networks so I don’t fully understand it, unfortunately.

We have two WiFi networks and two routers. One of the Wi-fi networks and its associated router was supplied by our internet company and works in a standard way. The second network “goes through two routers to get to the internet” according to my partner.

As long as we’re both on the standard WiFi network which was given to us by the internet company Minecraft works fine.

Edit: Double checked details with my oartner. we can play over LAN when we’re on the same network. I need to sign in to Minecraft using the “standard” network, and then switch over to the “weird” network to join my partner’s Minecraft world using LAN.

1 Like

This implies NAT may be acting between the 2 different LAN networks. When using the one provided by the ISP both are on the same LAN network so the second router is not in use.

1 Like

Basically you need to pick one network and have everything on there. Or if y’all have a lot of devices you might say “All our Google / Amazon devices (like Alexa, or Nest, or Fire TV, etc) on one network, and all our computers, printers, servers, etc on the other”

1 Like