Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
Ignas R.
Read in 5 minutes
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?
A user can connect to a game server on their local machine by connecting via an internal IP address like 192.168.0.1. This is because it is a local address.
Port forwarding allows remote computers access your router and local network using specific TCP or UDP ports. Usually, port forwarding can be accessed via default router gateway.
How to Port Forward Minecraft?
You will need to discover the default server port, allow it through firewall, and tweak your router configuration in order to make a Minecraft server public.
Important! Important!
Step 1. Step 1.
1. Open the Minecraft directory and 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:
25565 - for Java Edition.
19132-19133 - TCP and UDP ports for Bedrock.
Although it is possible to change the port, users can change the server-port value from 1 to 65535. Srazy's blog We recommend that the default one be used.
Step 2. Step 2.
You will need your firewall to allow the Minecraft port number so that the server can function properly. This section will cover the process for three operating systems: Windows, macOS and Linux.
Firewall Management for Windows
1. Open Windows Defender Firewall Advanced Security.
1. Click on Inbound Rules. Select New Rule.
1. Click Next and choose Port.
1. Select TCP, and enter the Minecraft port number. In this case, it is 25565. Once done, click Next.
1. Click the Next button until you reach the final step. Before you click Finish, give your rule a name like this:
1. Once you have created the rule create a new one with exactly the same configuration for UDP.
Firewall Management for macOS
1. Go to System Preferences. Select Security & Privacy.
1. Choose Firewall and click on the Firewall Options button.
If the option is grayed, select the lock icon at the lower-left to unlock Firewall Options.
1. Click Add to locate the Java application that is installed and confirm the selection. Make sure the Allow incoming connection option is enabled.
Firewall Management on Linux
Linux comes with a more complicated firewall than Windows and Mac. 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. It will be used in order to log in to router.
2. Establish a static IP address.
3. Open the port forwarding setting.
4. Please specify which TCP or UDP ports you wish to forward.
Find the Router address and set up a static IP in Windows
To open the command prompt, press Windows + R and enter CMD. Run the following command
The default gateway line will show the router's address IP address.
To set up a static IP address, press Windows + R again and enter ncpa.cpl. Right-click your network interface. Select Properties. Locate Internet Protocol Version 4 and select Properties.
Specify your preferred static IP address, subnet Mask (255.255.255.0), as well as the router IP that you have previously acquired.
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. Go to System Preferences, and choose Network.
1. Click Advanced to find the network you are using.
1. Navigate the TCP/IP tab. The Router line will contain the router's IP address.
Alternatively, open Terminal and use the following command to check the router IP address:
To create a static local IP address go to the TCP/IP section. Select Using DHCP to manually address and enter the IP address. We recommend adding zero to the router IP.
Click OK to save the changes.
Linux Router Address: How to find it and set up a static IP
Open Terminal and type the following command to check the router IP on Linux-based systems:
You will need to edit your primary network configuration file in order to set up a static Internet Protocol. For example, you can access Ubuntu 18.04 configuration information by entering this command in Terminal and pressing Enter.
Here's a simple example of configuration where gateway4 represents your router IP and addresses refers the to your preferred static IPv4 Address:
Once you are done, save any changes to the 01-netcfg.yaml files.
Logging in to Router
Paste the router IP address into your browser's address bar and press Enter. You will see a login page.
It will ask for your username or password. If you are not sure where to look, check the stickers attached to your router. Another option is to Google the name and model of your router, along with keywords such default login credentials.
If your router is still using factory default credentials, it is best to change them immediately. Otherwise, anyone could gain access.
Once logged in, look for options related to virtual server or port forwarding. We will be using a D-Link router in this tutorial. It looks like this when you use it for port forwarding:
Select the Enabled option and give the forwarding rule name. Also, enter the Minecraft server port. In this case it is 25565.
Don't forget to apply the configuration for both TCP and UDP ports.
Save the changes once you are done.
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.
For the port forwarding changes to apply, you will need to restart your Minecraft server. Enter /stop on your server console to restart the server.
After the server has restarted open Google and type "What's mine IP" This will display your public IP address. You will need this to share with the people who you are playing with.
Expert Tip
Don't share your public IP via the internet. This could expose your physical location and make it a target for cyber attackers.
Egidijus Navardauskas
Cyber Security Head
Now players can connect to the server. Be aware that if the default port 25565 is changed, users will need the 185.185.185.185.185.port syntax to connect.
Alternativ, you can simply enter the IP address.
You can play with other people on a local Minecraft server that supports port forwarding, which makes your gaming experience more fun and unique.
This tutorial will show you how to port forward a Minecraft server on Windows and macOS. We've also shown you how an application can be allowed to pass through a firewall.
If you have any questions, please leave them in the comment section below.
How to Install Minecraft Mods Best Minecraft Mods
Ignas Rimkunas
Ignas is a Technical Content Writer at Hostinger. As a Customer Success Specialist, Ignas has helped people solve complex technical issues. His current goal is to write simple articles that make it easy for people to understand so that such issues don't happen. During his free time, Ignas likes to play video games and fix up things around his house.
Here's my website: https://srazy.info/
![]() |
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