Minecraft LAN Gaming on Windows10

Everybody loves Minecraft, especially your kids. They can play together easily using split screen on the PS4 but what if your kids are like mine and prefer to play on the PC? They can always find each other on a public server like Hypixel with other people on the internet, but sometimes it’s more fun to play together locally on the private LAN. This guide will provide the steps necessary to safely enable Minecraft LAN gaming without having to disable their firewalls. This has come up several times for me personally so time to document the steps.
So how does this work and what are the problems in native mode? Minecraft LAN mode takes a world from one hosting PC and makes it accessible to other Minecraft clients on the local network. As you have probably discovered, this doesn’t work at all if you just open up a game and start a LAN world. The joining PC you hope to share with just can’t see the world to join, resulting in a screen similar to this:


The problem here is that the hosting PC is successfully sharing the game but the joining PC can’t see it because the inbound traffic is being blocked by the firewall on the joining PC.


Network Profiles

The Windows 10 firewall works by shifting rule sets tied to specific network profiles, Public, Private and Domain. These profiles will take affect and do different things depending on the network you are attached to. By default, Win10 is configured in “shields up mode” with the network adapter set to the “public” firewall profile which is the most restrictive. While this is appropriate for public places or other people’s houses, I recommend changing this to the “private” profile, especially if on your trusted home LAN. This step is optional but makes general consumption of resources on your home network much easier and is relevant to the firewall rules we will enable in the next step. This step can be performed on all PCs on your local network.
First, while logged in with an administrator account, click the Wifi icon in the system tray next to the clock, then click the Properties link below your active connection.


This will open the Win10 settings dialog with more options, click the connection itself beneath the Wi-Fi toggle.


On the next page, click the “Private” radial button to switch the network profile. Important to note that if you access this page while running as a non-administrative user, you will not see this option.


Firewall Rules for Minecraft

Now that we have changed the firewall profile, we need to enable some special firewall rules on each joining PC. Important to note that any PC that wants to be a joining PC will need these rules in place. The key to enabling LAN gaming is by enabling a very specific Java executable through the firewall on the joining PC(s), as the PC hosting the game is initiating an outbound connection which will be allowed out by default. First, find the directory path that houses “javaw.exe”, this will vary depending on the JRE version you have installed but notice that this executable lives within the Minecraft program file space directly. The full path in this example is: C:\program files (x86)\minecraft\runtime\jre-x64\1.8.0_25\bin\javaw.exe.



Next, open the “Windows Defender Firewall with Advanced Security” app either as an administrator or right-click and choose “run as administrator”. Click the “Inbound Rules” element then in the center pane, look for 4 Java(TM)… rules that should have been created when the game was installed. You should see 2 rules for Public and 2 rules for Private profiles. Each rule set contains a rule to allow TCP connections and another for UDP connections solely for Javaw.exe. By default these rules are created and enabled but the connection is specifically blocked, hence the no symbol icon next to each.



To enable the connections, open each rule individually as appropriate for the active profile you have in place. If you followed the steps above, you will need to change the Private profile rules. On the General tab of the rule, select the “Allow the connection” radial.


If you click over to the Programs and Services tab, you will notice that the specific program specified in these rules is javaw.exe. Click OK to save the rule.


Once the rules are properly modified, you should see a green check icon next to each in the Inbound Rules list. This shows that the connection is allowed and that both rules are enabled for the Private profile. If you have the need to enable these rules for the Public profile, repeat these steps.


If you do not see these rules in your list by default, not to worry, we will create a new rule to cover the same actions. Right-click the Inbound Rules element in the left pane and select “New Rule”.  Choose “Program” on the rule type page, then browse to Javaw.exe in the directory identified previously for the program path.

    

Select to allow the connection on the next page, then select the network profiles to which the rule should apply. If you or your kiddo will go to other untrusted networks (friends houses) to play Minecraft, you may want to enable the public profile here as well. Finally, give the new rule a name and click Finish to enable the rule.

  

Start the LAN Gaming

To begin, from the hosting PC start a Singleplayer game and load the world you wish to share, in this example we’ve selected “#Building World”:


Once the map loads, press ESC to bring up the game menu and select “Open to LAN”. Next, choose the game mode for the session and whether to allow cheats, click “Start LAN World” when ready.

 

From the joining PC, start Minecraft using the “Multiplayer” option. You should now see any public servers your have configured as well as the game hosted on the LAN. Join the server and PROFIT.




Resources

They Talk too Much!

6 comments:

  1. Gaming has good and bad sides just like everything else. The key is how good and bad are those sides. For example, some games have a bad side with players that like to fight a lot.

    ReplyDelete
  2. I next to never comment on web posts, but OMG thank you for posting this. I knew that this was a firewall issue and thought i had allowed the right things, but it looks like when minecraft changed java from v25 to v51 the firewall rules didn't get opened/allowed for the v51 of java (v25 was fine). And also with microsoft changing how networks are defined to default to public (and hiding the GUI method to change).

    Peter, I used to do technical procedural documentation, and hats off to you on your walkthrough and explanations. My 14yo daughter was able to walkthrough your steps with me and provided an excellent learning experience as well. Now both my kids (and me) are able to see LAN games. This has been something that they have been asking my help with for a long time. Thanks again!

    ReplyDelete
    Replies
    1. Thanks very much for the kind words and I'm glad this helped you! :-)

      Delete
  3. Thank you! My boy and I were playing on macs (his an old mac mini), and now he has a "pro box" (win10 laptop), and we can now network play again.

    ReplyDelete

Powered by Blogger.