Quick Answer
Disable UPnP on your router, give your game server PC a static IP, then forward the port again. Test with a port checker tool. If that doesn't work, your ISP might be using Carrier-Grade NAT (CGNAT).
Why Port Forwarding Fails for Game Servers
I know this error is infuriating. You set up the port forward, double-checked the numbers, but your friends still can't connect. I ran a help desk for 6 years, and this was one of the top 5 questions—especially for Minecraft, Terraria, and Valheim servers.
The main reason? Your router's DHCP keeps changing your server's IP address. You forward port 25565 to 192.168.1.10, but when the router restarts, that IP might go to your phone. Also, UPnP often conflicts with manual port forwards. And sometimes Windows Firewall just blocks the port without telling you.
Step-by-Step Fix
Step 1: Give Your Game Server a Static IP
Skip this and you'll be re-doing the port forward every week. Here's how on Windows 10/11:
- Open Command Prompt as admin. Type
ipconfig. Write down your IPv4 Address (like 192.168.1.50), Subnet Mask (usually 255.255.255.0), and Default Gateway (your router's IP, like 192.168.1.1). - Go to Control Panel > Network and Sharing Center > Change adapter settings.
- Right-click your active connection (Wi-Fi or Ethernet) > Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) > Properties.
- Choose "Use the following IP address". Enter the IP you wrote down, subnet mask, and default gateway. For DNS, use 8.8.8.8 and 8.8.4.4 (Google's).
- Click OK. Your PC now has a static IP.
Step 2: Disable UPnP on Your Router
UPnP is great for consoles but terrible for manual port forwarding. It steals ports. Log into your router (usually at 192.168.1.1 or 192.168.0.1) and look for UPnP settings—often under Advanced > Network. Turn it off. Save.
Step 3: Forward the Port Correctly
In your router's port forwarding section, create a new rule:
- Service Name: Minecraft Server (or whatever)
- Protocol: TCP (or TCP/UDP for some games like Terraria)
- External Port: 25565 (or your game's port)
- Internal Port: 25565 (same)
- Internal IP: 192.168.1.50 (the static IP you set)
Save the rule. Reboot the router and your PC.
Step 4: Check Windows Firewall
Windows Firewall might block the port even if the forward is right. Open Windows Security > Firewall & network protection > Advanced settings. Create a new Inbound Rule:
- Rule Type: Port
- Protocol: TCP
- Port: 25565
- Action: Allow the connection
- Profile: Check all three (Domain, Private, Public)
- Name: Minecraft Server Port
Step 5: Test the Port
Go to canyouseeme.org from your server PC. Enter the port. If it says "Success", you're done. If not, move to alternatives.
Alternative Fixes If the Main One Fails
Check for ISP Carrier-Grade NAT (CGNAT)
If you see a different WAN IP on your router (like 10.x.x.x or 100.x.x.x) than what shows on whatismyip.com, you're behind CGNAT. Call your ISP and ask for a public IP. Most give one free if you ask nicely. I've had to do this for Comcast and Spectrum.
Use a VPN with Port Forwarding
This is my backup when CGNAT can't be fixed. Services like PureVPN or AirVPN let you port forward through their network. It adds a little lag but works for most games. Not ideal for competitive FPS.
Try a Different Port
Some ISPs block common ports like 80, 443, and 25565. Use a high port like 51234. Update your game server config to match.
Double NAT? Bridge Your Router
If you have two routers (ISP modem + your own), you might have double NAT. Put the ISP modem in bridge mode, or connect your PC directly to the ISP modem. This fixed it for a friend who had AT&T and a Netgear.
Prevention Tip
Once it's working, write down your router model, firmware version, and the exact forwarding rule. Also set a DHCP reservation for your server's IP in your router (look for "Address Reservation" or "Static DHCP"). This way, even if your router resets, the IP stays. I've seen routers lose manual settings after firmware updates—having a screenshot saves your weekend.
Also, test the port every time you update your game server or your router's firmware. Those updates can wipe configs silently.