How to port forward a Minecraft server and start playing with your friends online. Follow our step-by-step guide for a seamless gaming experience!Many players dream of creating their own Minecraft server.This simple method offers options for playing together with friends, building unique worlds, and launching their own mini-activities. But even with proper server setup, there’s a significant chance that connecting to it from outside won’t work properly.
There are various causes for these issues, but one of the most common is a lack of proper port forwarding on your router. In this article, we’ll cover what port forwarding is, why it’s needed, and how to set it up correctly for Minecraft so your friends can connect to your server without errors or lag.
Port forwarding;How to Port Forward a Minecraft Server.
Port forwarding in Minecraft is a router configuration procedure that allows you to direct incoming network traffic from the internet to a specific device on your local network. This could, for example, be the computer running the Minecraft server.
By default, all home networks are protected by NAT, a technology that hides the internal IP addresses of devices. This is beneficial for security, but it prevents external players from connecting to your Minecraft server. Without this setting, the router can’t figure out where to send requests from other users, and therefore simply ignores them.
It’s important to understand that port forwarding is only required for the local server running on your device. If a player rents a third-party server from a hosting provider, such as Aternos or another similar company, there’s no need to set up port forwarding. Simply contact support, and their staff will handle the process for you.Now let’s go step by step through all the necessary steps for setting up port forwarding in Minecraft.
What port does Minecraft use?
Markus Persson’s cubic creation uses TCP port 25565 by default. This is the port most often opened for the server. Unless the gamer has manually changed it in the server settings, this is the port that needs to be opened and forwarded to the IP address of the target computer on the local network.
In Minecraft Bedrock Edition, the default port is 19132. However, you can change the port in the server.properties file by specifying a different value in the server-port line. In this case, you should specify the new value in the server settings when connecting players and forwarding on the router.
Make sure the Minecraft server is running locallyBefore opening ports, you need to ensure your own server is running and can be connected to within your home network. To do this, follow these steps:
- Launch the server using any available method, for example, via the server.jar file;
- If you planned to play with licensed accounts, make sure that online-mode=true is specified in the server.properties file;
- Launch Minecraft on another device on the same network and connect using the local IP address, for example 192.168.1.35:25565.If the connection works after these manipulations, then you can proceed to adjusting the router itself.
If the connection works after these manipulations, then you can proceed to adjusting the router itself.
Find out your computer’s local IP address.
To properly configure forwarding, you’ll need your computer’s internal IP address. On Windows, you can find this information as follows:Press the Win + R key combination on your keyboard;In the field that opens, type the command cmd and press Enter;In the command line that appears, enter ipconfig;Find the IPv4 address line, which will look like 192.168.xx
- For users of macOS and Linux operating systems, the algorithm is slightly different:
- Open a terminal on your device;Enter the command ifconfig or ip a;
- In the opened data, find your active network interface and IP address in the format 192.168.xx;
- Just in case, write down this address or save it somewhere, as you will need it when setting up the router.
To prevent your IP address from changing when you reboot your computer, we recommend setting up a static IP address. This can be done in the network settings or via DHCP reservation in your router.
Log in to your router’s control panel.
Each router has its own web interface. It’s typically accessible via an internal IP address, which typically looks like 192.168.0.1, 192.168.1.1, or 10.0.0.1. To access it, follow these steps:
- Open your browser;In the address bar, enter the IP address of the router, which is indicated on the sticker on the bottom of the device;
- Enter your login and password. If the user hasn’t changed the basic settings, use the default admin/admin, admin/1234, or admin/password from the sticker.
- If security has been lost, reset the router by holding the Reset button for ten seconds.
Set up port forwarding for 25565
The section names themselves may differ depending on the router model. However, the general operating principle is almost always the same. The typical instructions look like this:
Find the Port Forwarding, NAT, Virtual Servers, or Port Forwarding section. These are usually located in the Advanced or Security menu;
- Create a new rule that looks something like this:
- Title: MinecraftProtocol:
- TCP (sometimes you need to select TCP/UDP)External port:
- 25565Inland port:
- 25565Internal IP address
- : the one you found out in step 2 (192.168.xx)Save the settings and reboot the router if necessary.
Let’s look at examples of how this will look on several popular router models:
TP-Link.
- Go through the tabs one by one in Advanced — NAT Forwarding — Port Forwarding;
- Click Add New;
- Fill in the fields as indicated in the paragraph above;
- Enable the rule and save
.ASUS.
- Launch the WAN tab and then Virtual Server or Port Forwarding;
- Add a new rule;
- Don’t forget to specify the name, IP, port 25565, TCP protocol.
KeeneticIn.
the web interface of this model, go to the “Internet” section, and then “NAT Rules”;
Click “Add Rule”;
- Select the “Port Forwarding” type;
- Enter IP and port 25565.
If for some reason you’re unsure of your router’s interface, consider using third-party services. PortForward.com is considered the most effective, offering step-by-step guides for hundreds of router models.
Find out your external IP address.
Once the port is successfully opened, other users will be able to connect to your server via the external IP address. For maximum accuracy, you need to know this address. You can find it using the following algorithm:
- Go to 2ip.ru or whatismyipaddress.com;
- Type “my IP” into a search engine. It doesn’t matter if it’s capitalized or lowercase;
- All necessary data will appear on the page.
If your device has a dynamic IP address, it will change when you reboot the router or simply after a certain amount of time. In this case, it’s recommended to use a dynamic DNS service, such as No-IP or DuckDNS. This will allow you to obtain a permanent domain name.
Check if the port is open
After completing the setup, be sure to check that port 25565 is actually accessible from the internet. To do this, use online services such as canyouseeme.org and yougetsignal.com. To do this, follow these steps:
- Start your Minecraft server;
- Open one of the services mentioned above
- ;Enter port 25565 and confirm by clicking the Check button.
If the service reports “Success,” the port is open. If you see an “Error” or “Connection Refused” message, return to your router settings and make sure the device’s IP address is correct, that Windows Firewall or antivirus software isn’t blocking the connection, and that there aren’t any duplicate rules.
Configuring Windows Firewall.
Sometimes, even with proper redirection, the connection may not work due to the system firewall. In this case, your computer’s security system may require some adjustments. To allow incoming connections, you must:
In the Control Panel, open the System and Security tab, and from there go to the Windows Defender Firewall section;
- Click on the “Advanced options” item;
- In the left menu, select “Inbound Rules”, and on the right, click on “Create Rule”;
- Select “Port”, “TCP” and “Specific local ports: 25565” one by one.
After all the manipulations, all that remains is to allow the connection, give the new rule a name, for example, Minecraft Server, and complete the Windows Firewall configuration.
Possible problems.
One of the most common issues users encounter during setup is a “gray” external IP address. This means the provider uses CG-NAT, and standard port forwarding won’t work. In this case, you can order a dedicated IP service or use a VPN with port forwarding.Problems can also arise due to double NAT if multiple routers are used. In this case, ports must be opened on each device or one of the routers must be set to bridge mode.
What to do if redirection is not possibleIf for some reason you can’t set up call forwarding, you’ll have to resort to alternative options. Proven methods include:
- Third-party programs like Hamachi, ZeroTier, or ngrok. These services create a virtual network between devices, bypassing the need to open ports. The first is considered simple but outdated software. The second is more modern and stable, and the third is suitable for temporary access via an HTTPS tunnel.
- Server hosting. Services like Aternos, Minehut, or Shockbyte allow you to launch a server without configuring a router. The downside of this method is resource limitations and annoying ads in the free versions.
Security measures.
When opening ports in Minecraft, don’t forget about digital security. This is a complex procedure and carries various risks. To minimize threats, keep the following in mind:
- Always use a strong password for your router;
- There is no need to open extra ports unnecessarily
- ;Always update Minecraft and Java to the latest versions;
- Install security plugins if you use a server on Paper or Spigot, such as AuthMe for two-factor authentication;
- On public servers, online-mode=false is not allowed, as this allows pirate accounts and cheaters to connect.
Ideally, you’d restrict server access to only the required ports. Only after successfully setting up the servers will you gain full control over the gameplay.