Skip to content

Practical Windows server guide

Port Forward a Game Server on Windows Safely

Port forwarding is not one magic switch. It is a chain from a ready game process, through Windows Firewall, to a stable address on your router, and finally to an outside player. Configure and test one layer at a time so a failed join tells you where to look.

By Gone Wrong GamingReviewed 2026-08-3012 minute read

Use the game's real values

Write down the port plan before changing Windows

Open the game-specific server guide and record each port, protocol, and purpose. TCP and UDP are not interchangeable. A query, RCON, or administration service may use a different port from player traffic and may not need public exposure at all.

Also record the dedicated-server executable and current configured port. Copying a generic internet port list can open services your installation does not use or miss a custom value that your server actually uses.

  • Player-facing game port and protocol
  • Optional query or discovery port
  • Administration port, kept private unless the official design requires otherwise
  • Dedicated-server executable path
Sources[S1]

The router cannot start the game

Confirm the server is ready and listening

Start the server and wait for the game's documented ready signal. Join locally when the game supports it. A successful LAN connection proves far more than an open-port website because many game servers use UDP, respond only to valid game traffic, or ignore generic probes.

For TCP services, Windows can show current listeners with Get-NetTCPConnection. For UDP, Get-NetUDPEndpoint can show bound endpoints. Match the owning process to the dedicated server before changing firewall rules.

Get-NetTCPConnection -State Listen | Sort-Object LocalPort
Get-NetUDPEndpoint | Sort-Object LocalPort

Give the router a durable target

Reserve the host PC's LAN address

Use ipconfig to record the active adapter's IPv4 address, subnet mask, and default gateway. In the router, create a DHCP reservation for the server PC so it receives the same address after restarts. A reservation is usually safer than inventing a manual static address that could overlap the router's DHCP pool.

If the PC uses both Ethernet and Wi-Fi, reserve and forward to the adapter that actually carries server traffic. Prefer Ethernet for a machine expected to stay reachable; changing adapters can change the address and firewall profile.

ipconfig /all
Sources[S2]

Allow the intended process

Create a narrow Windows Firewall inbound rule

Microsoft's advanced firewall supports custom inbound rules that combine a program and a port. That is preferable to disabling the firewall or allowing every program to receive traffic on a broad range.

Create a Custom inbound rule, select the dedicated-server executable, choose the documented TCP or UDP protocol and local port, allow the connection, and apply only the network profiles the server actually uses. Name the rule with the game, purpose, protocol, port, and date so it can be audited later.

  1. 1

    Open Windows Defender Firewall with Advanced Security.

  2. 2

    Choose Inbound Rules, New Rule, and Custom.

  3. 3

    Select the exact server executable where practical.

  4. 4

    Set the documented protocol and local port; do not paste a TCP/UDP range by habit.

  5. 5

    Choose the applicable profile, name the rule clearly, and leave the firewall enabled.

Sources[S1]

Map one outside service inward

Create the matching router forward

Router labels vary—Port Forwarding, Virtual Server, NAT Rule, or Applications and Gaming can describe the same job. Map the external game port to the same internal port at the reserved server address unless the game documentation deliberately uses a translation.

Create separate entries when protocols or purposes differ. Do not forward a remote desktop, file-sharing, database, or web-admin service just because it exists on the host PC.

Stop and check: UPnP can create mappings without leaving the same explicit record as a manual rule. For a server you operate deliberately, prefer mappings you can name, review, and remove.

Sources[S4][S6]

Leave the home network

Test with the real game client from outside

Keep the server running and test from another internet connection. Use the game's actual join method: direct address, server browser, platform invitation, or relay. A generic port checker is not a substitute for a valid UDP game handshake.

If LAN works and external access fails, verify the router rule target and compare the router WAN address with the public address. A private or shared WAN address points to double NAT or CGNAT. If neither LAN nor external access works, return to the process, port, and Windows rule.

Sources[S2][S3]

Quick answers without unsafe shortcuts

Common questions

Do I forward TCP, UDP, or both?

Use exactly the protocol listed for that game's configured service. Choosing both is not safer; it creates an unnecessary second exposure when only one protocol is used.

Why does the server work on LAN but not from outside?

The process and local path are probably healthy. Inspect the Windows rule profile, router target, second-router or modem layer, and possible ISP CGNAT.

Can an online port checker test a UDP game server?

Not reliably. Many UDP servers respond only to a valid game-specific packet. A real client on another connection is the best end-to-end test.

Should the RCON port be public?

Usually not. Player traffic and administration are different trust boundaries. Keep RCON private unless the game's official design and your security controls require a remote path.

Primary references

Sources reviewed

  1. [S1] Microsoft Learn

    Configure Windows Firewall rules

    Reviewed 2026-08-30

  2. [S2] Microsoft Learn

    ipconfig command reference

    Reviewed 2026-08-30

  3. [S3] RFC Editor

    RFC 6598: Shared Address Space Request

    Reviewed 2026-08-30

  4. [S4] CISA

    Internet Exposure Reduction Guidance

    Reviewed 2026-08-30

  5. [S6] U.S. National Security Agency

    Best Practices for Securing Your Home Network

    Reviewed 2026-08-30

  6. [S7] Microsoft Learn

    Get-NetTCPConnection command reference

    Reviewed 2026-08-30

  7. [S8] Microsoft Learn

    Get-NetUDPEndpoint command reference

    Reviewed 2026-08-30

Continue with the right detail

Related help