MineFixTools server utility lab
Fixes 2 min read Updated

Port Forwarding Not Working for Minecraft Server

Fix Minecraft port forwarding not working by checking server-port, local IP, router NAT, Windows Firewall, UFW, provider firewalls, and CGNAT.

Port forwarding fails when any layer disagrees about where traffic should go. The router rule is only one part of the path.

Confirm the Server Is Listening

Start the server and check:

server-port=25565
server-ip=

Then test locally. If localhost:25565 fails on the server machine, port forwarding is not the first problem. Fix startup or server config first.

Forward to the Local IP

Your router forward should point to the server machine's private IP:

| Field | Example | | --- | --- | | External port | 25565 | | Internal port | 25565 | | Protocol | TCP | | Internal IP | 192.168.1.40 |

Do not forward to your public IP. The router already owns the public side of the connection.

Make the Local IP Stable

If your server machine gets a new LAN IP from DHCP, the old forwarding rule points to the wrong device. Reserve the IP in the router or set a proper static address.

Avoid DMZ as a permanent fix

Putting the whole server machine in a router DMZ exposes more than Minecraft. Use a targeted port forward and firewall rule instead.

Check Firewalls

Open the same port in:

  1. Windows Firewall or Linux firewall.
  2. Router NAT/port forwarding.
  3. VPS or cloud firewall if hosted.
  4. Game panel allocation if applicable.

Use Windows Firewall setup or UFW firewall setup for platform-specific steps.

Check CGNAT

If your router WAN IP is private or does not match your public IP, your ISP may be using CGNAT. In that case, normal forwarding cannot expose your server directly. Read Minecraft server behind CGNAT for options.

Test From Outside

Do not test public access only from inside your own network. Some routers do not support NAT loopback. Use a mobile hotspot or an external tester after the server is running.

FAQ

Why is my Minecraft port forward still closed?

Common causes include the server being offline, forwarding to the wrong local IP, OS firewall blocking traffic, wrong protocol, provider firewall, or CGNAT.

Should I forward TCP or UDP?

For a normal Java Edition server, forward TCP. Bedrock and Geyser setups may require UDP separately.

Do I forward to my public IP?

No. Router port forwarding should point to the server machine's local LAN IP, such as 192.168.x.x.

Related Tools

Related Articles