Port Forwarding

Networking, the fun part.
​
Imagine you own an entire building filled with PO boxes. Your wide-area network (WAN) IP will be the building (the physical address) and each PO box will be each port. For security reasons, each of these ports are NOT automatically open to the public. We need to open just a couple ports to allow Minecraft to talk to the networks outside. If you are ONLY playing within your household, this probably isn't necessary (connect with local IP address).
​
***Unfortunately this is only a SUGGESTION guide. All modems/routers will be different, so you'll probably need to do some of your own research***
​
First we need to set a static local IP on the server so port forwarding will work. We don't want our server having a different IP address every time it reconnects to the router.
​
On the bottom right of your desktop, you'll see a network link icon. Click and hit Edit Connections. Select Wired Connection 1 and hit the cog at the bottom to edit. Go to the tab IPv4 Settings and add an address. Set an address that's similar to your computer's. If you can, have it be outside of the DHCP automatic range.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
Navigate to your router's page in your web browser. Most of the time the address is:
​
192.168.1.1
​
OR
​
192.168.0.1
​
If both these don't work, look on the router itself, it may have an address for you to put in. In Windows you can use the command prompt to help figure this out. Open Start and type CMD and open the command prompt. Issue this:
​
ipconfig
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
Where it says Default Gateway that's your router's home IP address.
​
​
When you reach this page, you'll be prompted for a username and password. Look up the default credentials for your brand of router, or look on the stickers on the back/bottom, it should tell you. Usually its root and/or admin for either or both the username and password.




Here's what my Spectrum-issued Arris brand modem/router combo login page looks like.
​
Log in


Here's the status or basic setup page you'll be greeted by. On the top you can see a tab for Firewall. That's where the port forwarding setting will be.


Hit add and add a "virtual server".
​
***These ports are set in your server.properties file in EVERY instance of Minecraft! If you have a very strong CPU and want to run multiple servers at once (virtual machines may help with that), you need to set each server to be on its own port.
​
Default ports
​
Bedrock: 19132 and/or 19133
​
Java: 25565
​
​
Hit Add Virtual Server and you should be good to play!
​
NOTE: Consider the security implications of using all default ports. There's an argument to be had about security through obscurity, but consider the people using automated scripts to scan for servers. It'll probably only search the default ports.
NOTE: If you plan on making your server open to the public, you'll need to take necessary precautions before opening up and giving out a path to your home network. Several STRONG recommendations include: SSH hardening, general OS hardening, logging, automatic OS updates, firewalls, intrusion detection/prevention.
​
All of the security-related guides linked are guidelines - a strong mindset of security is required to host public servers. Take it seriously so your home network isn't compromised.