What port forwarding does for a Minecraft server
Port forwarding tells your router to send incoming traffic on a specific port number directly to the computer running your Minecraft server. Without it, connection requests from the internet hit your router's external IP address but have nowhere to go — your router doesn't know which device inside your home is listening for them.
When you port forward, you create a rule that says: "Any traffic arriving on port 25565 (Minecraft's default) should go to the computer at 192.168.1.5 on the same port." Your friends then connect using your external IP address and that port number, and their traffic reaches your server.
This is different from playing on a LAN (local area network), where players on the same WiFi can join without port forwarding. Port forwarding is what you need when friends connect from outside your home network.
Key Takeaways
- Port forwarding requires you to log into your router's settings, find the port forwarding section, and create a rule pointing port 25565 to your server computer's local IP address.
- Your server computer needs a static local IP address so the port forward rule doesn't break when the address changes.
- You share your external IP address and port number with friends — you can find your external IP by searching "what is my IP" in a browser.
- Port forwarding works only if your internet service provider doesn't block port 25565 or restrict your ability to forward ports.
- If port forwarding fails, your ISP may be blocking it, your router may not support it, or your local IP address may have changed.
Finding your server computer's local IP address
Before you can create a port forward rule, you need the local IP address of the computer running your Minecraft server — the address it has on your home network, not the one the internet sees.
On Windows: Open Command Prompt (search "cmd" in the Start menu), type ipconfig, and press Enter. Look for "IPv4 Address" under your active network connection — it usually starts with 192.168 or 10.0. Write this down.
On Mac: Open System Preferences, go to Network, select your active connection, and look for "IPv4 Address" in the window. On Linux, open a terminal and type hostname -I to see your local IP.
This address can change if your router restarts or if your computer's network settings reset. To prevent your port forward rule from breaking, set a static IP address on your server computer — most routers have an option to reserve an IP for a specific device, usually found in DHCP settings.
Logging into your router and finding port forwarding settings
Every router is different, but the basic steps are the same. Open a web browser and type your router's IP address into the address bar — this is usually 192.168.1.1 or 192.168.0.1, but check your router's label or manual if those don't work.
You'll be asked for a username and password. The defaults are often "admin" and "admin" or "admin" and the router's serial number, but again, check your manual. If you've changed these and don't remember them, you can reset the router to factory settings by holding a small reset button for 10 seconds — this erases all your settings, so do this only if you're willing to reconfigure everything.
Once logged in, look for a section called "Port Forwarding," "Port Mapping," "Virtual Server," or "UPnP" — the name varies by manufacturer. It's often under Advanced Settings, NAT, or Firewall. If you can't find it, search your router model and "port forwarding" online to find the exact path.
Creating the port forward rule
In the port forwarding section, you'll see fields for external port, internal port, protocol, and internal IP address. Here's what to enter:
- External Port: 25565 (or whatever port your Minecraft server is running on — check your server.properties file if you changed it)
- Internal Port: 25565 (usually the same as external port)
- Protocol: TCP and UDP (Minecraft uses both; if you can only pick one, choose TCP first)
- Internal IP Address: The local IP address you found earlier, like 192.168.1.5
Some routers ask for a name or description — call it "Minecraft Server" so you remember what it's for. Save the rule. Your router may ask you to restart or apply changes; do that if prompted.
After the restart, the rule should be active. It can take a few minutes to take effect, so wait a moment before testing.
Finding your external IP address and testing the connection
Your friends need two pieces of information to join: your external IP address (the one your internet service provider assigns to your home) and the port number. Open a browser and search "what is my IP" — the first result will show your external IP, usually something like 203.45.67.89.
Give your friends this address and the port number in the format 203.45.67.89:25565. They enter this in Minecraft's multiplayer menu under "Server Address."
To test it yourself before inviting others, you can try connecting from another device on a different network (like a phone on mobile data) using your external IP and port. If it works, the port forward is set up correctly. If it doesn't, see the troubleshooting section below.
Why the connection might not work
If friends can't connect, the most common causes are: your server computer isn't actually running the Minecraft server, your local IP address changed and the port forward rule now points to the wrong device, or your internet service provider is blocking port 25565.
Check that the Minecraft server software is running on your computer and that it shows "Done" in the console window. If your computer restarted, the server won't be running automatically unless you set it up to launch on startup.
Log back into your router and verify the port forward rule still points to the correct local IP address. If it doesn't match what you see in ipconfig or System Preferences now, update it and save the change.
If the server is running and the rule is correct, your ISP may be blocking the port. Some providers restrict port 25565 to prevent home servers. You can try changing your Minecraft server to a different port (like 25566) and creating a new port forward rule for that port instead — if that works, your ISP was blocking 25565. Otherwise, contact your ISP to ask if they allow port forwarding.
Keeping your server safe while port forwarding
Port forwarding opens a direct path from the internet to your computer, so take basic security steps. Keep your Minecraft server software updated, use a strong password if your server has one, and consider using a firewall rule to allow traffic only on port 25565 — don't forward unnecessary ports.
If you're not actively running the server, disable the port forward rule in your router settings rather than deleting it. This way you can turn it back on later without re-entering all the details. Never share your external IP address publicly on social media or forums — share it only with people you want to join your server.
Frequently Asked Questions
Can I use a different port number instead of 25565?
Yes. Change the port in your server.properties file (the line that says "server-port=25565"), restart the server, then create a port forward rule for the new port number. Your friends will connect using that port instead. Some people do this if their ISP blocks 25565 or if they want to run multiple servers on one computer.
What if my external IP address changes?
Most home internet connections have a dynamic IP address that can change when your modem restarts. If this happens, your friends won't be able to connect until you give them the new address. Some routers support dynamic DNS (DDNS), which automatically updates a domain name when your IP changes — this lets friends use a stable address instead. Check your router settings for DDNS options.
Do I need to port forward if I'm using a hosting service instead of running a server at home?
No. Hosting services run your server on their own computers and give you an address to share with friends. You don't control the router or the network, so port forwarding doesn't apply. You only port forward when you're running the server on your own computer at home.
Will port forwarding slow down my internet?
Port forwarding itself doesn't slow your connection. However, running a Minecraft server uses bandwidth and CPU power, which can affect other devices on your network if you have limited internet speed. A server with a few friends playing uses much less bandwidth than streaming video, but it's worth knowing if your internet is already slow.
Can I delete the port forward rule and add it back later?
Yes. You can delete it anytime and recreate it later using the same settings. If you're not running the server regularly, disabling the rule (rather than deleting it) is easier — you just toggle it off and on instead of re-entering all the details.