How to Port Forward a Minecraft Server (and When You Shouldn't)
Port forwarding is how friends outside your house join the Minecraft server running inside it. Your router blocks incoming connections by default; a port-forward rule tells it "traffic on port 25565 goes to this computer." That is the entire concept.
The steps are simple, but they touch three different places (your PC, your router, your firewall), which is why it feels harder than it is. Here is the clean path, plus the honest section on when you should not do this at all.
Before you start: what you need
- The server already running and reachable on your own PC (
localhostworks in-game). - Your PC's local IP (something like
192.168.1.20): on Windows, runipconfigand read the IPv4 address; on Mac, it is in Network settings. - Your router's admin page: usually
192.168.1.1or192.168.0.1in a browser, with the login printed on the router itself.
Step 1: Give your PC a static local IP
Routers reshuffle local IPs over time, which silently breaks your rule. Fix the address first:
- In your router's admin page, find DHCP or LAN settings and reserve your PC's current IP against its MAC address (often called "DHCP reservation" or "static lease").
- Alternatively, set a static IP on the PC itself in the adapter settings, outside the router's DHCP range.
Step 2: Add the port-forward rule
Every router brands this differently (Port Forwarding, Virtual Server, NAT rules), but the fields are always the same:
- External/service port:
25565 - Internal port:
25565 - Internal IP: your PC's local IP from step 1
- Protocol: TCP (add UDP too if the router bundles them; Java Minecraft itself needs TCP)
Save and reboot the router if it asks.
Step 3: Let the server through the firewall
- Windows: the first launch prompt usually handles it; if not, add an inbound rule allowing TCP 25565 in Windows Defender Firewall, or allow Java for private and public networks.
- Mac: approve the Java/server prompt in the firewall settings.
Step 4: Test it properly
- Find your public IP (search "what is my IP").
- Have a friend connect to that public IP, or use an online Minecraft server status checker against it.
- Testing from your own network can fail even when everything is correct (many routers cannot loop back), so an outside tester is the only proof.
Friends connect with yourpublicip (add :25565 only if you changed the port). If your ISP rotates your public IP, a free dynamic DNS name saves you re-sending it weekly.
When you should NOT port forward
Honest advice: an open port on your home network is a real, if modest, exposure, and your uptime is your PC's uptime.
- Just playing with 2 to 4 friends? Try LAN over a VPN-style tool or an ephemeral tunnel first; no router changes at all.
- Want the server up when your PC is off, or more than a handful of players? Rent a host. That is what every serious server on our list does.
- Running it anyway? Keep the server updated, enable the whitelist (
/whitelist on, covered in our server commands guide), and enable online-mode so only real accounts join.
Frequently asked questions
What port does Minecraft use?
Java Edition defaults to TCP 25565; Bedrock uses UDP 19132. Change them in server.properties if you need to.
Why can my friends still not connect?
In order of likelihood: wrong internal IP in the rule (it moved; do step 1), firewall blocking Java, testing from inside your own network, or an ISP that uses CGNAT and gives you no real public IP. For CGNAT, tunnels or rented hosting are the fix; no router setting will help.
Is port forwarding safe?
It exposes exactly one service: your Minecraft server. Keep it updated, whitelist your players, and the practical risk is low. Never forward "DMZ" or "all ports" to your PC, which some guides suggest; that is genuinely unsafe.
Do I need to port forward for a rented server?
No. Hosted servers come with a public address out of the box, which is half the reason to use one.
Once you are public, the last step is making the server worth joining: our modded server guide covers the fun half of the setup, and when you are ready for real players beyond your friends, add your server to the list.
