If you’re trying to host your own Minecraft server, you’ve probably come across the term Minecraft port forwarding.
It might sound a little intimidating if you’re not used to tweaking your router settings, but don’t worry, it’s a lot more manageable than it seems.
In this guide, we’ll walk you through everything you need to know about port forwarding for Minecraft in 2026, covering Windows, macOS, and Linux. We’ll also explain what it’s for, what protocol it uses, and how to make sure you get the best possible connection.
Whether you’re setting up a survival server for your friends or launching a big modded world, getting your ports configured right is one of the most important steps.
What is Minecraft Port Forwarding Used For?
Let’s start from the top.
When you play Minecraft online, your computer needs to talk to other devices over the internet. Servers and players connect to each other using ports, which are essentially digital doors your router uses to handle traffic.
Normally, your router keeps most of these doors locked to keep your network secure, but when you’re hosting a Minecraft server, you need to manually unlock the one Minecraft uses so others can connect to you.
That’s where port forwarding comes in.
Minecraft uses port 25565 by default. If you’re the server host, forwarding this port tells your router, “Hey, if anyone tries to connect on port 25565, send them to my computer.” Without this step, your friends simply won’t be able to join your game.
In short, port forwarding is used to:
- Allow players outside your network to connect to your Minecraft server.
- Bypass the limitations of NAT (Network Address Translation).
- Avoid connection timeouts and "can't connect to server" errors.
It’s a must if you're hosting a server from your home internet instead of a dedicated service.
Source: Minecraft Forum
How to Port Forward Minecraft on Windows, Mac, and Linux?
No matter which operating system you use, the actual port forwarding happens on your router, not your computer. But you’ll still need your machine's IP address and some basic settings to make it work.
Let’s go through the process step by step for all three major platforms.
Step 1: Set a Static IP Address
Before forwarding the port, assign a static IP to the computer hosting the Minecraft server. This makes sure your internal IP doesn’t change and break the port rule later.
On Windows:
- Press Windows + R, type cmd, and hit Enter.
- In the Command Prompt, type ipconfig and press Enter.
- Write down your IPv4 address, Subnet Mask, and Default Gateway.
- Open Control Panel > Network and Sharing Center > Change adapter settings.
- Right-click your active network, click Properties, then click on Internet Protocol Version 4 (TCP/IPv4).
- Set your static IP using the values you noted earlier.
On macOS:
- Open System Settings > Network.
- Select your network connection and click Details.
- Choose Manual under IP address settings and input your static IP, subnet mask, and gateway.
On Linux (Ubuntu-based):
- Go to Settings > Network.
- Click the gear icon next to your network.
- Under IPv4, set the method to Manual, and enter the IP, Netmask, and Gateway.
Step 2: Log Into Your Router
To access the port forwarding section:
- Open a browser and type your router’s IP address (usually 192.168.0.1 or 192.168.1.1).
- Log in using your router's credentials (found on the bottom of the router or in the manual).
Step 3: Add the Port Forwarding Rule
Now, go to the Port Forwarding or NAT section. Each router’s interface is slightly different, but the fields usually include:
- Name: Call it something like “Minecraft”.
- Internal IP / Device IP: The static IP of your computer.
- Port / Internal and External Port: Set both to 25565.
- Protocol: Choose TCP/UDP or Both.
- Enable: Make sure it’s turned on.
Save the changes and restart your router if needed.
Step 4: Test the Port
Use a port checking tool like canyouseeme.org or ask a friend to try joining your public IP (you can find it by searching “what’s my IP” on Google).
Make sure your Minecraft server is running when you test, otherwise, the port will appear closed.
That’s it. You’ve officially port-forwarded Minecraft!
Is Minecraft 25565 TCP or UDP?
Minecraft uses both TCP and UDP for different aspects of its communication, but for the most part, the TCP protocol handles the core gameplay connection.
To be safe, it’s best to forward both TCP and UDP when setting up port forwarding. Some routers give you the option to select “Both” or “TCP/UDP”. Use that if it’s available. If not, create two separate rules: one for TCP 25565 and one for UDP 25565.
How to Have the Best Connection to Play Minecraft?
Even if your port forwarding is set up perfectly, lag and high ping can ruin the fun, especially if you’re playing with people in different regions or using a network with traffic shaping or high jitter.
That’s where NoPing comes in.
NoPing is a tool that optimizes your connection by reducing ping, avoiding packet loss, and improving routing between you and Minecraft servers around the world. It works for both players and server hosts who want a better online experience. Here’s how it helps:
- Smart Routing: Automatically finds the best path between your device and the Minecraft server.
- Multi-server support: Lets you switch between different servers without relaunching.
- Real-time monitoring: You can keep an eye on your latency, jitter, and packet loss.
- Easy setup: You don’t need to mess with your router or install mods, just pick the game and server, and you're good to go.
For players who frequently join multiplayer servers, PvP arenas, or massive survival maps, NoPing can make a noticeable difference in gameplay smoothness.
Here’s how to use NoPing to improve your connection in Minecraft:
- Sign-up through the website and download NoPing (you can try it for free)
- Open NoPing and search for Minecraft inside the software
- Once you find Minecraft, click on it and, on the next screen, select “Choose automatic” or “Choose manual” and click “Continue”. We recommend choosing automatic, as NoPing’s technology analyzes all routes on a global scale and automatically selects the best option for you.
- On the next screen, click on “Optimize Game”.
- And that’s it, you can start playing Minecraft with optimized ping!
You can test different servers within NoPing to see which gives you the lowest latency.
FAQ
Do I need to port forward if I’m just joining a Minecraft server?
Nope! You only need to forward ports if you are hosting a Minecraft server. If you're just joining someone else's server, your router handles everything automatically.
What if my ISP uses CGNAT?
If your internet provider uses Carrier-Grade NAT (CGNAT), traditional port forwarding may not work because your router doesn’t have a unique public IP. In this case, you’ll either need to:
- Contact your ISP to request a static IP.
- Use a third-party tunneling service like ngrok or Hamachi (with limitations).
Why can't my friends connect even though I forwarded port 25565?
Here are some common reasons:
- The Minecraft server isn't running when they try to connect.
- Your firewall is blocking the port.
- Your public IP address changed and you didn’t update your friends.
- Your port forward isn’t pointing to the correct internal IP.
- Your router requires a reboot after changes.
Can I change the port from 25565 to something else?
Yes, but you'll need to update both the server.properties file and let your friends know the new port. They’ll have to connect using your_ip:port, like 192.168.1.50:25570.
Is port forwarding safe?
As long as you only forward the port you need and keep your system secure (firewall on, up-to-date software, strong passwords), it’s generally safe. Avoid forwarding random or unnecessary ports.
Will port forwarding work over Wi-Fi?
Yes, as long as your device has a stable connection and you forward to the correct internal IP. However, for hosting, a wired (Ethernet) connection is always more reliable.
Can I host a Minecraft server without port forwarding?
Yes, but with limitations. You can use services like:
- Minecraft Realms (for simple private servers hosted by Mojang).
- Third-party hosting providers (paid services that handle all the tech for you).
- Virtual LAN tools like Hamachi or ZeroTier (good for small groups, but less stable).
And that’s everything you need to know about Minecraft port forwarding in 2026! Hosting your own server can be super rewarding, and once your ports are open and configured, you’re free to build your world, invite your friends, and explore without limits.
If you want to make sure everyone — including yourself — has the best connection possible, NoPing can help you go even further.
So download NoPing now and play Minecraft with a premium connection! Start your free trial!

