Networking

How to Port Forward for a Game Server (and Why You Might Not Need To)

friends can't connectport forwarding not workingCGNAT
6 min read Updated 12 June 2026 ESAGAMES Team

Port forwarding tells your home router to send incoming game traffic to the right PC. Here's how to do it, the ports to open, and why it sometimes can't work at all.

What port forwarding does

Your router shares one public IP across every device. When a friend connects to your game, the router needs to know which PC to hand that traffic to — a port-forward rule maps a port to your PC's local IP.

Step 1: give your PC a static local IP

Forwarding breaks if your PC's local IP changes. Set a DHCP reservation in the router, or a static IP on the PC (e.g. 192.168.1.50).

Step 2: forward the game's port

In your router (usually at 192.168.1.1) → Port Forwarding, add a rule pointing the game port to your PC's local IP. Common ports:

Minecraft (Java)   25565  TCP
CS2 / Source       27015  UDP+TCP
Rust               28015  UDP
Valheim            2456-2457 UDP
FiveM              30120  TCP+UDP

Step 3: allow it in your firewall

Windows Firewall must allow the same port inbound, or the router forwards traffic to a PC that drops it. Add an inbound rule for the port/protocol.

Step 4: test from outside

Have a friend connect using your public IP (not 192.168.x.x), or use our server status checker from outside your network.

Why it sometimes can't work: CGNAT

Many ISPs (especially mobile/fibre) put you behind Carrier-Grade NAT, so you don't have a real public IP — and no amount of port forwarding will work. If your router's WAN IP differs from your public IP, you're on CGNAT.

The simpler answer: host it elsewhere

A hosted game server has a real public IP, the ports open by default, no router config, no exposing your home IP, and DDoS protection. For anything beyond a quick LAN-style session with friends, it's the easier and safer route.

Port forwarding works until CGNAT, a dynamic IP or your home upload ruins it. A hosted server skips all three.

Skip port forwarding entirely

A hosted game server has a real public IP, open ports and DDoS protection out of the box — online in minutes.

See game hosting
FAQ

Frequently asked questions

Why isn't my port forwarding working?

Common reasons: your PC's local IP changed, the firewall is blocking the port, you forwarded the wrong protocol (TCP vs UDP), or your ISP uses CGNAT so you have no real public IP. Test from outside your network to be sure.

What is CGNAT and how do I know if I have it?

Carrier-Grade NAT means your ISP shares one public IP across many customers, so you can't accept inbound connections. If the WAN IP in your router doesn't match the public IP shown by an "what's my IP" site, you're behind CGNAT.

Is it safe to port forward a game server from home?

It works, but it exposes your home IP (a DDoS risk) and opens a port into your network. For a public or persistent server, a hosted one with a separate protected IP is safer.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney