Windows can't connect to Linux Minecraft LAN

I have read a lot of stuff on here & elsewhere, but still not getting any joy.

I am running Linux Mint 17. The rest of my family are on Windows 7. I can join their LAN worlds, but they can't connect to mine.

I have tried editing the hosts file as in Can't set up a local LAN server on Minecraft 12w25a? et al, but that hasn't helped. My hosts file now looks like this:

XXX.XXX.XXX.XXX MYPC
127.0.0.1   localhost

# The following lines are desirable for IPv6 capable hosts
::1     MYPC localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

(My IP address & pc name are definitely correct in the real world)

I have run UFW commands to open port 25565 thus: (https://computerobz.wordpress.com/2014/06/13/how-to-minecraft-server-on-ubuntu/)

sudo ufw allow 22

Once that rule has been added then we can enable the firewall:

sudo ufw enable

Now we need to enable the other ports we are going to be using. Minecraft runs on a default port of 25565. Run the following command to add the port.

sudo ufw allow 25565

Check the Firewall status to make sure all is setup right:

sudo ufw status

25565 is set to "allow"

The server & port shows up on the Windows PC, just times out.

Any ideas where I go from here please?


Solution 1:

Opening Minecraft to LAN does not use the port 25565; instead it uses a different port each time. You can use

sudo ufw allow <port>

to open the port and change <port> with the port that Minecraft chose when opening to LAN. Or, if you want convenience, you can allow any connections from your local network here(assuming you trust everyone in your network... which you probably should!)

ufw allow from 192.168.0.0/24 to any

Change 192.168.0.0/24 to the IP range for your network.

Source: Ubuntu UFW Community Help Wiki specifically:

Allow by Subnet

You may use a net mask :

sudo ufw allow from 192.168.1.0/24 Allow by specific port and IP address

sudo ufw allow from to port example: allow IP address 192.168.0.4 access to port 22 for all protocols

sudo ufw allow from 192.168.0.4 to any port 22