Port Forwarding Not Working? Fix It Here

Port forwarding lets players on the internet connect to a game server running on your home network. Your router redirects incoming traffic on a specific port to your local machine. In theory it is simple. In practice, many things can go wrong.

How port forwarding works

Your router has a public IP address. Your PC has a private IP (like 192.168.1.x). When you set up a port forwarding rule, you tell the router: "Any traffic arriving on port 25565, send it to 192.168.1.50 on port 25565." Without this rule, the router drops incoming connections because it does not know which device they are meant for.

Common issues

  1. Wrong local IP address. If your PC's IP changed (DHCP assigned a new one), the forwarding rule points to the wrong device. Set a static IP or use a DHCP reservation.
  2. Port number mismatch. The external port, internal port and the game server's configured port must all match (unless you intentionally remap them). Minecraft Java uses 25565, Bedrock uses 19132, and other games have their own defaults.
  3. Double NAT. If you have two routers (for example, your ISP modem plus your own router), you need to forward the port on both devices. Or better, put the ISP modem in bridge mode so only your router handles NAT.
  4. CGNAT (Carrier-Grade NAT). Your ISP may put you behind a second layer of NAT that you cannot control. This makes port forwarding impossible without requesting a public IP from your ISP or using a tunnel service.
  5. Firewall still blocking. Even with port forwarding set up, the Windows Firewall or Linux firewall on the server machine might block the port. You need to allow it in both the router and the local firewall.
  6. ISP blocking ports. Some ISPs block common ports (like 80, 443 or gaming ports) on residential connections. Try using an alternative port number.
  7. Router not saving rules. Some routers lose configuration on reboot. Verify your rules persist after a router restart. Update the router firmware if this keeps happening.
  8. UPnP conflicts. Universal Plug and Play can automatically create forwarding rules, but these may conflict with manual rules. Disable UPnP if you are managing ports manually, or vice versa.

Step-by-step troubleshooting

1. Confirm your local IP

On Windows, open Command Prompt and run ipconfig. On Linux or Mac, run ip addr or ifconfig. Your IPv4 address should match the internal IP in your port forwarding rule. If it does not, update the rule or set a static IP.

2. Verify the game's required ports

Check the game's documentation for which ports and protocols (TCP, UDP or both) it needs. Forward exactly those. Minecraft Java needs TCP 25565; Bedrock needs UDP 19132; Valheim needs UDP 2456-2458; ARK uses UDP 7777 and TCP 27015.

3. Test with an online port checker

Search for "open port check tool" and enter your public IP and port. Make sure the game server is running during the test. If the port shows as closed, the forwarding is not working or a firewall is blocking it.

4. Check for CGNAT

Compare the public IP shown on a site like whatismyip.com with the WAN IP in your router's admin page. If they are different, you are behind CGNAT. Contact your ISP to request a public IP (sometimes called a "static IP" or "real IP" in their terms).

5. Disable conflicting firewalls temporarily

Turn off Windows Firewall (or your Linux firewall) briefly and test again. If the connection works without the firewall, add a specific allow rule for your game's port and re-enable the firewall. Never leave it disabled permanently.

6. Try DMZ for testing only

Most routers have a DMZ option that forwards all ports to one device. Set your server's IP as the DMZ host temporarily. If connections work in DMZ mode, your individual port forwarding rule has an error. Fix the rule and disable DMZ afterward.

Skip port forwarding entirely

All of these problems disappear with hosted game servers. A hosted server has a public IP and open ports ready to go. No router configuration, no CGNAT limitations, no firewall troubleshooting. HostValues game servers come with ports pre-configured and DDoS protection included.

How do I know if I am behind CGNAT?

Compare your router's WAN IP with your public IP (check whatismyip.com). If they differ, you are behind CGNAT. Another sign: your WAN IP starts with 100.64.x.x to 100.127.x.x, which is the CGNAT range. Contact your ISP to ask for a public IP.

How can I test if a port is actually open?

Use an online port checker (like canyouseeme.org) while the server is running. You can also ask a friend to try connecting. From outside your network, run nmap -p 25565 your-public-ip to check the port state. It should show "open," not "closed" or "filtered."

TCP vs UDP: which do I forward?

It depends on the game. Minecraft Java uses TCP. Minecraft Bedrock uses UDP. Many games use UDP for gameplay and TCP for queries. Check your game's documentation. When in doubt, forward both TCP and UDP for the required ports.

Skip the hassle. HostValues VPS hosting gives you a public IP with full port control, no forwarding required.


Still stuck? Open a support ticket and our team will help you out.

Back to the blog