How to port forward a Minecraft Server

Port forwarding refers to the method of allowing certain traffic to enter your network via your router. You need to forward a port whenever you want to connect to an internal network from the internet. Port forwarding is necessary for many games and applications. A firewall acts as a shield between your network and the outside world and prevents unwanted internet traffic from entering. To connect to the internet, you install a Minecraft server. If you want to connect with your Minecraft world, you will need to enable incoming connections to your network so that your friends and family can access it.

You can improve your network connection’s speed and stability by forwarding ports when playing games. Some games can greatly benefit from being redirected through the router to receive incoming network requests. Incoming network requests were not intended for routers. The important steps that are required for port forwarding are mentioned below.

Installation of Minecraft server

The first step for port forwarding is to ensure that you have installed the Minecraft server correctly and also to check if it is properly working after its installation. Minecraft server file is based on java extension (.jar) so you have to install Java first if you already didn’t. Type the following command into the terminal to see if it has been installed.

$java -version

If it is not showing any java version then you can install it by visiting their official website as shown in the image below.

You will also need to install the Minecraft server application once you have downloaded and installed Java. You can do that by visiting their official website. You can find all the technical details regarding the installation of the Minecraft server from this link.

Retrieving your Router page

After correctly installing the Minecraft server, the next step is to open your router page for network configuration. But before this, you need to know the IP address of your default gateway and IP address of the system that you can find as Ipv4. If you type “ipconfig” to the command prompt, you can find the default gateway IP address. You can see the address of the default gateway in the wifi settings tab as shown below.

The next step is to open any browser and type the address of default gateway and hit the enter key as shown below. This will open up your router page and you need to access it. If you don’t have the login information then you can get it by contacting your internet service provider (ISP). As our default gateway is, so I need to write this in the browser.

Setting up the IP address

After accessing the router page you will see different settings. Keep that in mind that these settings are different depending on your wifi device. Like in our case you can see there is an option of port mapping that works in the same way so don’t get confused if you are not able to find the tab with the name of port forwarding.

When you assign your computer a static IP address (rather than a dynamic one), the IP address will not change if your computer loses its connection to the router. This means that you won’t have to update your IP address in the server’s settings each time you turn back on your computer. Here you need to type the MAC address of the machine that you are using for creating the Minecraft server and the IP address is the Ipv4 address of the machine.

Port Forwarding configuration

There are multiple options available for the configuration that is required for port forwarding is mentioned in the steps below

  • You will see the application tab to select the server type as the DNS server.
  • Next is the mapping name where you can write Minecraft. For example, after that, you need to select the WAN name.
  • The internal host is the ip address of your machine where the Minecraft game is installed, and the external source ip address represents the range of all the external devices.
  • The IP address for Internet clients can be selected via the dropdown menu. If your laptop or smartphone is connected to the home network, you can use it as the client.
  • he next field is to enter the starting and ending port number range for LAN and WAN, on which you want to forward the incoming traffic for the service or application. In this case, the starting and ending values for both internal and external ports should be 25565 as we like to allow only this port for communication.

The last field is to specify the WAN connection name from the dropdown list on which your device is connected.

Minecraft Firewall settings

Minecraft uses port 25565 for its communication with external devices. So it is recommended to allow this port by TCP and UDP both; otherwise, the communication will get blocked by the firewall. For that, you need to select the inbound rules option and make the changes accordingly, as shown below.

Now, after all the configurations mentioned above, you should be able to test the server.

You can check the minecraft server by opening the Minecraft game and selecting the multiplayer option. You can also add the servers that you have allowed before and can play with them together.


Port forwarding refers to the method of allowing specific traffic to enter your network via your router. If you want to connect with your Minecraft world, you will need to enable incoming connections to your network so that your friends and family can access it. This will also improve your network connection’s speed and stability when you are playing multiplayer games with your friends or random people all around the globe. The essential steps that are required for port forwarding have been discussed in this article.

About the author

Taimoor Mohsin