Minecraft Port Forwarding Not Working? 10 Fixes for Java & Bedrock Servers (2026)

If friends can’t join your Minecraft server after you port forwarded, the rule is usually pointing at the wrong port, protocol or local IP, your firewall is blocking the server, or your ISP uses CGNAT, which makes port forwarding impossible from your router. Java servers need TCP 25565; Bedrock servers need UDP 19132. Check those first, then work down the list below.

Quick check: 1) Forward TCP 25565 (Java) or UDP 19132 (Bedrock) to the current local IP of the PC running the server. 2) Allow the server through Windows Defender Firewall. 3) Compare the WAN IP in your router with your public IP. If they differ, you’re behind CGNAT, and forwarding won’t work without help from your ISP.

Minecraft server ports and protocols

Server Default port Protocol Set in
Java Edition server 25565 TCP server-port in server.properties
Bedrock Dedicated Server (IPv4) 19132 UDP server-port in server.properties
Bedrock Dedicated Server (IPv6) 19133 UDP server-portv6 in server.properties

If you changed the port in server.properties, forward that number instead, and friends must add it to the address (for example 203.0.113.10:25570 on Java).

Minecraft port forwarding not working: 10 fixes

1. Use the right protocol

The most common mistake. Java uses TCP; Bedrock uses UDP. If unsure, choose “TCP/UDP” or “Both” in the router.

2. Forward to the correct local IP

The rule must point to the local IPv4 address of the computer running the server (for example 192.168.1.20). Find it with ipconfig on Windows (IPv4 Address) or in network settings on Mac and Linux. Local IPs can change after a restart, so set a DHCP reservation (sometimes called a static lease) for that PC in your router.

3. Allow the server through your firewall

On Windows, open Windows Defender Firewall → Allow an app through firewall and allow Java (javaw.exe / java.exe) or bedrock_server.exe on Private and Public networks. Or create an inbound rule for the port. Third-party antivirus firewalls need the same exception.

4. Make sure the server is actually running

A port only shows as open while something is listening on it. Start the server, wait for “Done” in the console, and then test.

5. Leave server-ip blank

In server.properties, server-ip= should usually be empty. If it’s set to an address the PC doesn’t have, the server won’t listen where you expect.

6. Check for CGNAT

Log into your router and find its WAN/Internet IP. Compare it with your public IP from any “what is my IP” site. If they differ, there’s another NAT layer in front of you. A WAN IP in the 100.64–100.127 range almost always means carrier-grade NAT. A private range (10., 172.16–172.31 or 192.168.) can mean CGNAT or a second router in your home (see fix 7). Forwarding on your router can’t work then. Ask your ISP for a public IPv4 address (sometimes a free request, sometimes paid), or use an alternative below.

7. Fix double NAT

If you have an ISP modem-router and your own router, the forwarding rule has to exist on the first device too, or that device needs to be in bridge mode. Mesh systems in router mode behind an ISP router cause the same problem.

8. Give friends your public IP, not the local one

Friends outside your home use your public IP (plus port if not default). Players on your own Wi-Fi use the local IP. Public IPs can change, so recheck it if the server suddenly stops working, or use a dynamic DNS name.

9. Don’t test from inside your network

Many routers don’t support NAT loopback (hairpinning), so joining your own public IP from home fails even when forwarding works. Test from mobile data or ask a friend.

10. Restart the router and check UPnP conflicts

Some routers only apply new rules after a reboot. If UPnP is on and another device already grabbed the port, delete that UPnP mapping or pick another port.

How to test the port properly

  1. Start the server and wait until it has fully loaded.
  2. Use an online open-port checker for your public IP and port. For Java (TCP), “open” means forwarding works. Most checkers only test TCP, so they can’t confirm a Bedrock UDP port. For Bedrock, test with a real join from another network.
  3. Have a friend on another network join, or join yourself using phone data.

If port forwarding can’t work

  • Realms: Mojang’s paid hosting for Java and Bedrock. No ports or IP addresses needed.
  • A hosted server from a Minecraft server provider.
  • A tunneling service or private VPN that gives your server an address reachable from outside. Use well-known, reputable software only.
  • Bedrock worlds with friends: you don’t need port forwarding at all. Joining through the Friends tab works through Xbox services. If that fails, see Unable to Connect to World fixes.

Frequently asked questions

Do I need to port forward for Open to LAN?

No. LAN worlds are for players on the same local network. Remote friends need a server with forwarding, Realms, or a tunnel.

Is port forwarding safe?

Opening one port to a Minecraft server is common. Keep the server software updated, use a whitelist (white-list=true in server.properties) and don’t forward ports you don’t need.

My server shows “Connection timed out” for friends. Is that port forwarding?

Usually yes: the traffic isn’t reaching your PC. “Connection refused” usually means it reached the PC but nothing is listening on that port.

Does the server need a lot of RAM?

More players and farms need more. If the server lags once people join, see our lag spike fixes.

Running the server with friends? Our Minecraft commands list covers op, whitelist and gamerule commands.

Our guides are researched, fact-checked and updated as games change. How we research and verify our guides.