Minecraft Windows to Linux LAN

ShadowOdysseus

Honorable
Apr 23, 2014
110
0
10,690
So, I have an old pc running Linux for hosting a server on. I am fairly new to Linux and operating it, but I have succeeded in getting a Minecraft server running on it. However, connecting to it so that I can play with my friends online is where the issue lies. Inbound connections work just fine, but LAN connections from my Windows pc don't.

After digging around, the most reasonable cause for it was in this post from 2012: https://www.minecraftforum.net/forums/support/server-support-and/1872601-a-world-opened-to-lan-on-a-linux-computer-is

In short, it describes that the localhost call from java that Minecraft uses returns something different in Linux and Windows. Later in the post there is a response that a workaround could be made by editing /etc/hosts and messing around in there. I followed the instructions and added this line to my hosts:

192.168.1.68 mccombsserver

However, nothing was fixed even after a restart. Does anyone know if I did it wrong or the proper way to fix it? This seemed the most reasonable, despite the post being from 2012.

Bumped from Networking because I posted it at a bad time.
 
Solution
So you ping 192.168.1.68 and get the response from 192.168.1.213? Thats very strange ... it seems like something went wrong with your routing tables. Can you try to flush your cache by running

Code:
netsh interface ip delete destinationcache
from a command prompt with admin privileges?

flobernd

Commendable
May 17, 2018
66
0
1,660


Nah. Connecting with the internal IP works just fine. There has to be an other problem.

Could you check the following things:
- The Minecraft server should be bound to 0.0.0.0 to listen on all interfaces
- Double check the internal IP address of your Linux system
- Try to ping your linux system
- Disable your Windows Firewall (only for testing)

If it works with the firewall disabled, read this thread:
https://www.howtogeek.com/194858/ask-htg-why-cant-i-connect-to-lan-games-on-my-home-network/
 

flobernd

Commendable
May 17, 2018
66
0
1,660


Nah that's not correct. I was administrator of many many minecraft servers and it was ALWAYS possible to connect with the internal IP address AND the public address (with "online" setting enabled). The TCP socket can't even decide wether an address is internal or public ...
 

ShadowOdysseus

Honorable
Apr 23, 2014
110
0
10,690


Binding the server to 0.0.0.0 in the properties changed nothing, pinging 192.168.1.68 from cmd returns a reply from 192.168.1.213 with destination host unreachable. That could be attributed to ufw only allowing 22 and 25565, but I don't know. Opening my firewall likewise changed nothing.
 

flobernd

Commendable
May 17, 2018
66
0
1,660
So you ping 192.168.1.68 and get the response from 192.168.1.213? Thats very strange ... it seems like something went wrong with your routing tables. Can you try to flush your cache by running

Code:
netsh interface ip delete destinationcache
from a command prompt with admin privileges?
 
Solution

ShadowOdysseus

Honorable
Apr 23, 2014
110
0
10,690
I cleared the cache and it is the same response. I neglected to check the router page earlier to see what 213 corresponded to; its the computer I am trying to connect to the linux server in Minecraft from.
 

ShadowOdysseus

Honorable
Apr 23, 2014
110
0
10,690
I found the error, most of this was done late at night, so there was a mistype/misread early on in the fix. The solution outlined in the forum link I posted was correct, however I put .68 instead of the correct .86. When I went to check what the linux server said the connection was on, I noticed the mistype and it is working now. Thank you for helping!