How to port forward a game server

Step by step: find your local IP and router with ipconfig, log in to the router, add a port forwarding rule, the ports for Minecraft, CS2, Rust and FiveM, the Windows Firewall rule, testing from outside and spotting CGNAT.

  • 2:13 video
  • English captions & transcript
  • 20 October 2026

Transcript

The full narration, chapter by chapter. Click a time to play the video from there.

Intro

Want your friends to join a game server you run at home? Then you need to port forward. Here's how, step by step.

What it does

Your router has one public IP for every device in your home. When a friend connects, the router doesn't know which device should get that traffic… so it drops it. A port forwarding rule tells it: send this port to that PC.

Find your IPs

Step one: find two addresses. Open Command Prompt and type ipconfig. The IPv4 Address is your PC's local IP. The Default Gateway is your router. Then give your PC a fixed local IP, with a DHCP reservation in the router, so the rule keeps working after a restart.

Log in to the router

Step two: type the router's address into your browser, and log in. The username and password are often printed on a sticker on the router.

Add the rule

Step three: find Port Forwarding. Depending on the router, it can also be called Virtual Server, NAT, or Applications. Add a new rule: a name, the game's port, the protocol, and your PC's local IP. For Minecraft, that's port 25565, TCP. Then click Save.

Game ports

Every game uses its own ports. CS2 uses 27015, UDP and TCP. Rust uses 28015, UDP. FiveM uses 30120, TCP and UDP. Check the exact ports for your game.

Firewall

Step four: allow the same port in Windows Firewall, with a new inbound rule for that port and protocol. Otherwise, the router forwards the traffic to a PC that blocks it.

Test it

Step five: test it from outside your network. Search "what is my IP" — your friends connect to that address, never to the 192.168 one. Still not working? Compare the WAN IP in your router with your public IP. If they're different, your internet provider uses CGNAT, and port forwarding can't work at all.

Or skip it

Or skip all of this. A hosted game server has its own public IP, the ports already open, and DDoS protection included — and your home IP stays private. Find guides and hosting at esagames.ro.

More video tutorials

  • 1:06
    Networking

    Fix TeamSpeak "failed to connect to server"

    Why TeamSpeak cannot connect and how to fix it: the ports (UDP 9987 voice), entering the address and a custom port, "could not resolve hostname" (DNS), firewalls and VPNs blocking UDP, and reading the connection log.

  • 1:19
    Networking

    How to find your game server IP and port

    Where to find your game server's IP and port: on a hosted server in the panel, at home the difference between local and public IP, why sharing a home IP is risky, the default game ports, and testing the address from outside.

  • 3:19
    Networking

    How to run a WinMTR test

    Step-by-step: download WinMTR, run a test to your server, what every column means (Loss %, Sent, Recv, Best, Avrg, Worst, Last), how to read the result, how to send it in a ticket, and the reverse mtr test from a VPS.

Skip the troubleshooting

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