Categories: General

How to Port Forward a Minecraft Server on Linux, Windows, and MacOS

Are you struggling to let your friends connect to your Minecraft server and want to learn how to port forward a Minecraft server on Linux, Windows, and macOS?

Minecraft facilitates the easy creation of one’s personalized servers. Port forwarding helps and allows sending out or receiving data or accessing blocked sites while the firewall is still in play. Without port forwarding, it isn’t easy.

Creating and port-forwarding your Minecraft world on a local host is a fascinating experience. However, playing alone can become tedious after a while. With port forwarding, users could get a modded Minecraft server for others to connect and play online.

Nobody wants to play Minecraft alone, but hosting a server requires effort. Port forwarding is essential if a user wants others outside their local network (not on the same Wi-Fi or LAN) to join the server they’re hosting. This process allows external traffic from the internet to reach the user’s computer by opening specific ports on their router, enabling others to connect to the Minecraft server.

In this article, we will provide an in-depth guide on what port forwarding is, how to port forward Minecraft, and why you need port forwarding for your Minecraft server in a nutshell.

Let’s dive in!

What Is Port Forwarding?

A port in port forwarding is not related to the physical ports on the back of the router. Any device on the network can receive a port forward, regardless of which physical port it’s connected to or whether it’s using Wi-Fi. In port forwarding, a port functions like a phone extension, allowing data to be directed to a specific service. Ports are numbered from 0 to 65,535 and are used to send and receive information. HTTP is the protocol used for transmitting data over the web, but it does not encrypt secure websites—that’s the role of HTTPS.

Port forwarding is a method of making a device on a network accessible from the internet. It allows other people to connect to you by putting a device outside of the router and directly connecting to the Internet.

Port forwarding includes adding a port on a router that is open to outside connections. From there, users from specific areas of the network can connect, and the Minecraft server is open to anyone you select. You can direct the router to send data from the internet to the device on the network.

Port forwarding has nothing to do with the internet speed. Running a high bandwidth by port forwarding can give some allowance.

Example Of Port Forwarding:

It is important to know how things work in theory and real-life examples, such as a user who wants to set up a public Minecraft server for his friends and himself.  Setting a server requires a bit of coding, but there is no need to focus on this. The thing to know is that the Minecraft server is local and can only be accessed from devices connected with LAN and share the same external IP address. To play with friends it is necessary to access it unless you come home and connect to the computer. 

There is a server for incoming connections from remote devices or where port forwarding occurs. In router configuration, enter a standard Minecraft server port number 25565. Routers forward incoming connections from fellow devices to the Minecraft server.

Typical Uses Of Port Forwarding Include:
  • Using torrent applications to download files quickly.
  • Hosting on a VPS server to access the home network from afar.
  • Running remote desktop protocol for remote access to a computer.
  • Permitting file transfer from the computer to the outside world and networks.
  • Hosting game servers for multiplayer gaming from outside the home network.
Types of Port forwarding:
  1. Local port forwarding.
  2. Dynamic port forwarding.
  3. Remote port forwarding.

How to Port Forward Minecraft?

To make a Minecraft server publicly accessible, first, identify the default server port and ensure it’s allowed through the firewall. Then configure the router settings for port forwarding. Make sure the Minecraft server is set up properly before starting the port forwarding process.

To find the IP address of your Minecraft server, press the Windows key + R simultaneously to open the Run dialog box. Type ‘CMD‘ in the text box and click ‘OK’ to open the command prompt. In the console, type the command ipconfig /all. Look for the ‘Default Gateway‘ or ‘IPv4 Address‘ and copy these values for reference. Now, let’s discuss the steps for port forwarding a Minecraft server.

Step 1. Setting The Port On Minecraft Configuration:

Setting the port on the Minecraft server configuration is important for communication with players. Here are the default port numbers that users need to know for different versions of Minecraft:

  • 19132 to 19133: These ports are utilized for Minecraft Bedrock Edition, which allows UDP and TCP intense connections for cross-platform play.
  • 25565: This is a default code for Minecraft Java edition commonly utilized for Minecraft server gameplay.

How to Port Forward a Minecraft Server By Configuring The Port For Your Minecraft Server:

If you are setting up a Minecraft server on a window machine, follow these  detailed steps to configure it correctly:

A. Open the Minecraft Server Directory:

 Go to the folder where the Minecraft server is installed in the user directory or where you downloaded server files.

B. Locate The server.properties File:

Within the server, you can directly find a file named server.properties, which has all the Minecraft server configuration settings.

C. Open server.properties With Text Editor:

Right-click on the server.properties file and select “open” from the context menu. Then, select a text editor of preference, such as Live Notepad or Notepad++, to edit the files.

D. Find The Line For The Server Port:

Scroll through the file and find the line that is specified for the server because it will listen to incoming connections.

E. Modify The Server Port Value:

Change the server port to any number ranging from 1 to 65535. It is recommended that the user wants to have another application using the same to have a multiplied Minecraft server on the same machine.

F. Save Your Changes:

After modifying the server port value, save your changes in the text editor. Make sure to close the text editor after saving toward any accidental modification.

G. Restart Your Minecraft Server:

Finally, for the effect of the changes, restart the Minecraft server. If it is running, close it and then start it again. Setting the port on Minecraft configuration applies to setting it up and your server communicating correctly with other players.

Following these easy steps, the user will learn how to port forward a Minecraft server or configure a server to provide the best player experience through smooth and uninterrupted gameplay.

Step 2. Allow The Port On Your Firewall:

To ensure the server works quickly and efficiently, allow Minecraft numbers through the system firewall. Go over the process for how to port forward a Minecraft server on Windows, MacOS, and Linux.

A. Firewall Management On Window:

  1. First, open the Window Defender Firewall with advanced security.
Window Defender Firewall with advanced security
  1. Hit on Inbound Rules and select New Rules.
  2. Then select port or click Next.
  1. Select TCP and then enter Minecraft port number 25565. When it is done, hit Next.
  1. Select Allow Connections and keep hitting Next until the final step. Before pressing finish, give the rule a name.
  1. After creating a rule, make a new one following the same configuration, but this time for UDP.

B. Firewall Management On macOS:

  1. Go to system settings and select Network.
  2. Select Firewall and click options.
  3. Hit the Add button, look for installed Java applications, and confirm the selection. Ensure that the Allow incoming connection option is selected, and press Ok.

C. Firewall Management On Linux:

The Linux system uses configuration, but steps depend on the Linux distribution. 

Here is an example of UBUNTU using UFW (uncomplicated firewall):
  • Press Windows + R and type CMD to open the command prompt, then run the command ipconfig.
    • The router IP address is shown as the default gateway.
  • To set up a static IP address, press Windows + R again and enter ncpa.cpl.
    • This will open the Network Connections window.
  • Right-click the network connection you are using (e.g., Ethernet or Wi-Fi), select Properties, locate Internet Protocol Version 4 (TCP/IPv4), and then click Properties again.
  • Specify the preferred static IP address, subnet mask as [255.255.255.0], and the router IP (default gateway) you noted earlier.
    • The subnet mask should be 255.255.255.0, not 255.225.255.0.
  • After you press OK to save the changes, the static IP address should be configured.

Step 3. Forward The Route On Your Router:

After setting up the firewall and making the network request, create port forward rules on the router. Each router has different interfaces, so the steps for port forwarding a Minecraft server should be nearly identical.

  1. Find the Default gateway IP address. It can be used to login to the router.
  2. Setup Static IP address.
  3. Open Port Forwarding pc settings.
  4. Specify which UDP ports or TCP to forward.

A. Finding Router Address And Setting Static IP on Windows:

  1. Press Windows+R and type CMD to open the command,  then run this command, “IP config“.
  2. The router IP address is shown as the default gateway away.
  3. To set up a static IP address, press Windows + R again and enter ncpa.cpl.
  4. Press network connection, select properties, locate internet protocol version 4 TCP/IP, and then select properties again.
  5. Specify the preferred static IP address subnet mark as [255.225.255.0] and the router IP earlier.
  6. After you press ok to save changes.

B. Finding Router Address And Setting Up A Static IP On MacOS:

Finding the router address on MacOS is essential.

  1. Go to system settings, press Network, and then hit details.
  2. Go to the TCP/IP tab, and the router line has a router IP address.
  3. Open the terminal and use the command to check the router’s IP address, “Netstat -nr/grep default“.
  4. To set up static local IP addresses, go back to TCP in the IP section, select DCP with manual address, and specify the IP, like adding a 0 as a router IP.
  5. Click okay for save.

C. Finding The Static Local IP Address And Setting Up Static IP On Linux:

  • To find the router IP address on a Linux system, open the terminal and enter this command, “route -n | grep "0.0.0.0" | awk '{print $2}””.
  • You need to edit the primary network configuration file to set a static IP address. For Ubuntu 22.04, access the configuration file using this command, “sudo nano /etc/netplan/01-netcfg.yml“.
  • Here is an example of how you might configure a static IP address, a gateway, and DNS nameservers:
# This file describes the network interfaces available on your system
# For more information, see netplan(5)
network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.2.100/24  # Replace with your preferred static IP
      gateway4: 192.168.2.1  # Replace with your router's IP
      nameservers:
        addresses:
          - 1.1.1.1
          - 8.8.8.8  # Additional DNS server
  • Once you have made the necessary changes to the configuration file, save it by pressing CTRL + O to write the changes, then CTRL + X to exit the editor.
  • Finally, apply the changes using, “sudo netplan apply“.

D. Logging Into The Router:

  • Paste the router IP address in the browser address bar and click enter. The login interface will appear.
  • They ask for a username or password. If you do not know where to find them, check the sticker on the router bottom or Google the router name and model number with related keywords like default login credentials.
  • After login related to port forward MC server and virtual Minecraft servers and ports, a D-link router is used in this.
  • Check the Enabled option to give forwarding rules the name or specify the local static IP address that has been set previously, or then enter the Minecraft server for 25565.
  • Apply all configurations for both TCP and UDP ports.
  • After completion, save changes.

Step 4: Restart The Minecraft Server And Connect:

Once you have made changes in Minecraft port forwarding, you need to restart the Minecraft server by placing the ./stop in the server console and then start it up again to re-initialize the server with the new setting.

After the server restarts, open the preferred search engine, and the game is attached. Hit “What’s my IP”? Then, you can see public IP addresses that must be shared with the people you wish to play with, like friends and family members.

If the user keeps the default Minecraft port (25565), players can join the server using the public IP address alone. However, if the user changes the port number, players must connect using the format your_ip:port_number, for example, 185.185.185.185:25566.

Alternatively, give the IP address after reacting. Always share your API  with trusted people because it gives your network information. Once players have your IP and port information, they can quickly join the server or enjoy playing together.

Why Do You Need Port Forwarding for Your Minecraft Server?

Having a local Minecraft server is fantastic, but how can a user share it with his friends? The ultimate answer is through port forwarding Minecraft. Minecraft servers get direct incoming traffic through the router by enabling port forwarding of necessary ports. Without port forwarding, external players cannot play and connect to Minecraft’s server.

Port forwarding is needed for Minecraft servers because it enables friends and other players to access the user’s local network to the server and participate in multiplayer gameplay. 

Port Forwarding For Minecraft Server In A Nutshell

In a nutshell, users can easily set up forwarding for the Minecraft server by following some steps.

  1. First, create Minecraft on MacOS or Windows.
  2. Check allowance through your port and configure it.
  3. Then, by keeping an eye on guidelines, forward a port on the router.
  4. After all setup, others can quickly join it using an IP address and explore virtual reality together. To get rid of the tedious process, get Minecraft VPS hosting services.

Port Forwarding for Minecraft is not Working

If port forwarding for Minecraft is not working, you should first check the chat or logs for any error messages. Additionally, there are some steps you can take to resolve the issue.

  1. First, see if you correctly configure the port forward Minecraft server setting on the router.
  2. Minecraft server IP should be set to local IP, and forward 25565 for Java edition.
  3. While utilizing the port-forward Minecraft server Bedrock, verify that the TCP and UDP ports are forwarded.
  4. Understanding how to port forward a Minecraft server involves checking router and firewall settings, ensuring the Minecraft server IP is identified, and troubleshooting any issue.
  5. Sharing the Bedrock Minecraft server address is vital so players connect.
  6. If Minecraft port forwarding is not working again, check all steps.
  7. If you are facing the issue of the server unjoining suddenly, then this is due to IP addresses being dynamic and changing occasionally.

If your friend can’t join it, you must follow this.

  • Make sure to correct port forwarding in Minecraft.
  • See that Java server port 25565 is forwarded, and for Bedrock servers, confirm that ports 19132 and 19133 are forwarded.
  • After checking these, check that Windows Defender is not blocking Java or Minecraft for both ports.
  • Another reason could be a computer antivirus that blocks connection. See that there is an exception for Minecraft and port forwarded.
  • In the last check, the router access the port through the portwall. This is easy and the same as changing settings or making exceptions for the port.

Conclusion

A Minecraft server with port forwarding lets its users play with their family, friends, and others for a more unique and exciting experience. This blog covers Port forwarding a Minecraft server on Windows, MacOS, and Linux systems. It also shows how to allow applications through firewalls and navigate router interfaces. If you have any questions, please ask them in the comment section below.

Unlock the full potential of your Minecraft server with easy port forwarding. Experience seamless gameplay with VPS Malaysia’s reliable Minecraft VPS Hosting!

Kaif

Recent Posts

What Is a Forex Expert Advisor? And How Does It Work

How does a forex expert advisor work to boost trading efficiency? It is challenging to…

1 month ago

What Is Dedicated Hosting & Why Use It

In the digital world, where everyone has an online presence, a high-performance website is a…

1 month ago

What Is a Web Server and How Does It Work?

What is a web server? One of the vital technologies that allows the exchange of…

2 months ago

Top 11 Forex Chart Patterns You Need To Know

Want to master the top forex chart patterns that boost trading success? Chart patterns are…

2 months ago

Web Security | Protecting Your Website from Threats

Web security is an essential concern in an increasingly technological world. Cyber attacks cost the…

2 months ago

RAID 10 | Boost Your VPS Performance with VPS Malaysia

If you are an IT person, you must come across RAID 10 term— a virtualized…

2 months ago