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 Minute 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. However, you will only see it, and it can get tedious to play alone. Port forwarding makes it possible to make Minecraft servers visible for anyone to connect to and play.



This tutorial will show you how to port forward a server on Windows, macOS, and Linux and discuss the required configuration for this process.



What is port forwarding? Step 1. Step 2. Allow the Port to Your Firewall


Step 3. Step 3.


Step 4. Restart the Minecraft Server and Connect





What is port forwarding?



If a user has a locally running game server and wants to play with friends, connecting via an inner IP address, such as 192.168.0.1 won't work because it's a local IP.



Port forwarding allows remote computers to connect your router and local network by using specific TCP and UDP ports. Usually, port forwarding can be accessed via default router gateway.



How to Port Forward Minecraft



You will need to locate the default server port and allow it through a firewall. Then, you can tweak your router configuration to make the Minecraft server visible publicly.



Important! Important!



Step 1. Set the Port on Minecraft Configuration



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


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


1. Find the server-port line:


These are the default port numbers that Minecraft uses:



Java Edition: 25565


19132-19133- TCP/UDP ports for Bedrock


Although it is possible to change the port, users can change the server-port value from 1 to 65535. We recommend that the default one be used.



Step 2. Step 2.



You will need to allow Minecraft port number through your firewall in order to ensure the server is working properly. 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 Advanced Security.


1. Click on Inbound Rules to select New Rule.


1. Select Port and click Next.


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 your rule, create another one with the exact same configuration just for UDP.


Firewall Management in macOS



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


1. Click on Firewall Options to choose the Firewall option.


To unlock Firewall Options if the option is grayed-out, click on the lock icon in lower-left corner.



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


Linux Firewall Management



Linux comes with a much more complex firewall than Windows, Mac, or both. Check out our tutorial to configure Ubuntu's firewall.



Step 3. Step 3.



After you have set up the firewall and allowed incoming network request, create a port forwarding policy on your router. The steps are the same regardless of whether each router has a unique interface.



1. Find your default gateway IP address. It will be used to log in to the router.


2. Create a static IP.


3. Fakeroot Open the port forwarding settings.


4. Specify which TCP/UDP ports to forward.


How to find the Router Address on Windows and Set up a Static IP



To open the command line, press Windows + R. The following command should be executed:



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



To create a static Internet Protocol address, press Windows+ R again and enter "ncpa.cpl". Right-click your network interface, select Properties, locate Internet Protocol Version 4 (TCP/IP), and select 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 and save your changes.



MacOS: Setting up a static IP and finding the Router Address



1. Navigate to System Preferences and click Network.


1. Select the network that you want to use and click Advanced.


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


Alternatively, open Terminal and use the following command to check the router IP address:



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 0 to the router IP.



To save your changes, click OK



Linux: Setting up a static IP and finding the router address



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



To create a static IP you will need edit the primary network file. To access Ubuntu 18.04 configuration, you can paste this command into Terminal and hit Enter.



Here's an example configuration: gateway4 is your router IP. Addresses refers to your preferred IPv4 address.



Once you are done, save any changes to the 01-netcfg.yaml files.



Logging in the Router



Paste the router IP address into your browser's address bar and press Enter. A login page will be displayed.



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



If your router is still using factory default credentials, it is best to change them immediately. Otherwise, anyone could gain access.



Log in to see the options for virtual server and port forwarding. We'll be using a D-Link Router in this tutorial. Its interface for port forwarding looks like this:



Make sure the Enabled option is checked, give the forwarding policy a name and specify the local static IP you have previously set, and then enter the Minecraft server port. It's 25565 in this example.



Don't forget the configuration for both TCP & UDP ports.



Once done, save the changes.



If you are still unsure about the exact port forwarding procedure for your specific router, you can always Google the device name and look up the router's manual.



Step 4. Step 4.



To allow port forwarding changes to take effect, you must restart your Minecraft server. To do so, enter /stop on the server console and reinitialize the server.



Once the server has restarted, open Google and enter "What's my IP". This will show your public IP address that you will need to share with the people you want to play with.



Expert Tip



Never share your public IP on the internet as this can expose your physical location and make you a target of cyber attacks.



Egidijus Navardauskas



Cyber Security Head



Now players will have the ability to connect to the server. Remember that if the default server port is changed to 25565, users will need to connect using 185.185.185.185.185.



Alternativ, you can simply enter the IP address.



Having a local Minecraft server with port forwarding allows you to play with other people, making your gameplay experience more exciting and unique.



In this tutorial, we have covered the process of port forwarding a Minecraft server on Windows, macOS, and Linux systems. We've also shown how to allow an application through a firewall and navigate the router interface.



If you have any further questions, please let us know in the comments below.



How to Install Minecraft Mods Best Minecraft Mods



Ignas Rimkunas



Hostinger's Technical Content Writer is Ignas. After helping people tackle even the most complex technical issues as a Customer Success Specialist, his current goal is to write easy-to-follow articles so that these issues will not happen at all. Ignas likes video games and fixing things around the house in his spare time.


Read More: https://fakeroot.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.