NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

How To Port Forward A Minecraft Server On Linux, Windows, And MacOS

Ignas R.



5 minutes Read



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



It can be fun to create your own Minecraft world on a local Server. It will only be visible to your friends, so playing alone can become tiring. Port forwarding makes it possible to make Minecraft servers visible for anyone to connect to and play.



This tutorial will demonstrate how to port forward a Windows, macOS or Linux server. It also discusses the configuration required.



What Is Port Forwarding? How to Port Forward Minecraft?Step 1. Step 2. Allow the Port to Your Firewall


Step 3. Step 3.


Step 4. Step 4.





What is Port Forwarding?



If a user has a game server running locally on their machine and wants to play together with friends, connecting via an internal IP address, like 192.168.0.1, won't work as it is a local IP address.



Port forwarding allows remote computers to connect your router and local network by using specific TCP and UDP ports. Usually, the port forwarding feature is available on most routers and can be accessed by logging in via the default router gateway.



How do you port forward Minecraft?



To make a Minecraft server visible publicly, you will need to find the default server port, allow it through a firewall, and tinker with your router configuration.



Important! Important!



Step 1. Step 1.



1. Open the Minecraft directory and locate the server.properties.


1. Right-click on it and open the file with a text editor.


1. Find the server-port number:


These are the default port numbers that Minecraft uses:



25565 - for Java Edition.


19132-19133: TCP and UDP ports available for Bedrock.


You can change the port value by changing the server_port value. However, we recommend that you stick with the default.



Step 2. Step 2.



To ensure that the server works correctly, you will need to allow the Minecraft port number via your firewall. In this section, we will go over the process on three operating systems - Windows, macOS, and Linux.



Firewall Management on Windows



1. Open Windows Defender Firewall with Advanced Security


1. Click on Inbound Rules to select New Rule.


1. Click Next and choose Port.


1. Select TCP, then enter the Minecraft port numbers. In this case, it is 25565. Once done, click Next.


1. Select Allow connection and click the Next button until the final step. Before clicking Finish, give the rule a name.


1. After you have created the rules, create a new one using the same configuration as the original, but for UDP.


Firewall Management for macOS



1. Go to System Preferences and select Security & Privacy.


1. Select Firewall and click the Firewall Options button.


If the option is grayed, select the lock icon at the lower-left to unlock Firewall Options.



1. Click Add, find the installed Java application, and confirm the selection. Make sure to check the Allow incoming calls option.


Linux Firewall Management



Unlike Windows or Mac, Linux comes with a more complex firewall. We recommend checking out our tutorial on how to configure your Ubuntu firewall.



Step 3. Step 3.



With the firewall set up and incoming network requests allowed, proceed to create a port forward rule on your router. Even though each router has a different interface, the steps will be similar.



1. Find your default gateway IP address. This will be used for logging in to the router.


2. Set up a static IP address.


3. Open the port forwarding setting.


4. Please specify which TCP or UDP ports you wish to forward.


Finding the Router Address and Setting up a Static IP on Windows



To open the command window, press Windows + R. Minecraft blog Enter CMD. Run the following command



The default gateway line will show the router's address IP address.



To create a static IP address press Windows + R and enter ncpa.cpl. Right-click the network interface and select Properties. Next, locate Internet Protocol Version 4 ("TCP/IP"), and click Properties again.



Specify the preferred IP address, subnet name (255.255.255.0), or the router IP you have acquired earlier.



Once you're done click OK to save your changes.



How to find the Router Address on macOS and set up a static IP



1. Navigate to System Preferences and click Network.


1. Click Advanced to find the network you are using.


1. Navigate to TCP/IP tab. The router's IP Address will be shown in the Router line.


Alternativly, you can open Terminal and run the following command:



To set up a static, local IP address, go to the section TCP/IP, choose Using DHCP without manual address, then enter the IP address. We recommend adding a zero after the router IP.



To save your changes, click OK



Linux Router Address: How to find it and set up a static IP



To check the router IP on Linux based systems, open Terminal and enter the following command:



Edit the primary network configuration file to set up a static IP. For example, you can access Ubuntu 18.04 configuration information by entering this command in Terminal and pressing Enter.



Here's an example configuration where gateway4 is your router IP and addresses refers to your preferred static IPv4 address:



Once done, save the changes made to the 01-netcfg.yaml file.



Logging in to the Router



Paste the router IP address in your browser's address field and hit Enter. A login page will be displayed.



It will ask you to enter your username and password. If you're not sure where to find them, look for the stickers on your router. Another option is to Google the name and model of your router, along with keywords such default login credentials.



If your router still uses factory default credentials, you should change them immediately. Anyone could gain access to your network.



Log in to see the options for virtual server and port forwarding. In this tutorial, we'll use a D-Link router. It looks like the following:



Select the Enabled option and give the forwarding rule name. Also, enter the Minecraft server port. In this case it is 25565.



Make sure to apply the configuration for both TCP ports and UDP ports.



Once done, save the changes.



If you are still uncertain about the port forwarding process for your router's model, you can search the device name and read the manual.



Step 4. Step 4.



For the port forwarding changes to apply, you will need to restart your Minecraft server. To do this, type /stop into the server console.



Once the server is up and running, open Google and search "What's your IP?" This will show you your public IP address which you will need to share it with the people that you want to play.



Expert Tip



Never share your public Internet IP online. This can expose your physical location, and make you a target for cyber attacks.



Egidijus Navardauskas



Cyber Security Head



Now players can connect to the server. Keep in mind that if the default server port 25565 was changed, users would need to connect using the 185.185.185.185:port syntax.



Alternativly, enter the IP Address.



Port forwarding allows you and other players to play on a local Minecraft server, making your gaming experience more interesting and unique.



This tutorial will show you how to port forward a Minecraft server on Windows and macOS. We have also shown you how to allow an app through a firewall, and how to navigate the router interface.



Should you have any questions, feel free to leave them in the comments section below.



How to Install Minecraft Mods Best Minecraft Mods



Ignas Rimkunas



Hostinger's Technical Content Writer is Ignas. After helping customers with technical issues of all kinds, Ignas now wants to write easy-to follow articles so that such problems don't happen. Ignas loves to play video games, and fix things around his home.


Homepage: https://dhakacourier.net/
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.