When a self-hosted game server works on your home network but friends cannot connect from outside, port forwarding is an obvious place to investigate. There are at least two separate barriers: the server machine's firewall and, with conventional IPv4 NAT, the router's forwarding rules. Carrier-grade NAT (CGNAT), DS-Lite, and games that use relays or peer-to-peer networking add another layer of complexity; some of those games require no manual forwarding at all.
This guide explains which rules are actually needed and where, rather than telling you to open every TCP and UDP port. Use each game's current official server documentation for exact port numbers, which vary by title and sometimes by version.
September 5, 2026.
Check whether your game needs port forwarding at all
Do not open ports simply because an old setup guide lists them. Some games use directly reachable dedicated servers, while others establish connections through a platform service or relay network. Valve's Steam Datagram Relay can carry both P2P and dedicated-server traffic without requiring players to connect directly to a public IP address.
Before changing firewall or router settings, consult your game's current developer documentation:
- Does it officially support self-hosted dedicated servers?
- Which port numbers and transport protocols does it specify?
- Are gameplay, server query, RCON, and web administration ports listed separately?
- Do players need direct access over the internet, or does a platform or relay service handle the connection?
Open only the services that the current documentation identifies as necessary.
TCP and UDP are not interchangeable
A port number without a transport protocol is incomplete. TCP and UDP use separate transport mechanisms; allowing TCP on a numeric port does not also allow UDP on that port. Microsoft's Windows Firewall documentation explicitly distinguishes protocols when defining rules. A recommendation to open both TCP and UDP is justified only when the game's current instructions require both.
For example, Facepunch's official Rust server documentation assigns different roles to ports and protocols: gameplay and query traffic use UDP, while RCON uses TCP. Do not blindly allow every listed port through both protocols.
The four layers of a game-server connection
| Layer | Typical failure | What to check |
|---|---|---|
| Server process | Not listening, or listening on the wrong port | Inspect server logs and configuration; try a local connection first. |
| Host firewall | Incoming traffic blocked on the server computer | Add a targeted rule for the program, port, and protocol. |
| Router / NAT | Internet traffic is not forwarded to the server's LAN address | Check that the forwarding rule points to the correct device. |
| Internet provider | CGNAT or DS-Lite prevents the expected inbound IPv4 connection | Check the router's WAN address and the access method. Local router rules do not configure provider NAT. Under DS-Lite, PCP may allow provider-side mapping if the ISP supports it, as discussed in FRITZ! documentation. |
Investigating in this order saves time. If the game server cannot be reached locally or from another computer on the LAN, the router and internet provider are not the first things to troubleshoot.
Configure Windows Firewall precisely
Microsoft Learn describes custom rules that can combine an application, protocol, local port, remote IP range, and network profile. For a game server, restrict access to what is actually required.
- Open Windows Defender Firewall with Advanced Security (the name can vary slightly by Windows version).
- Select Inbound Rules and then New Rule.
- Use Custom if you need fine-grained control.
- Restrict the rule to the specific server executable where practical.
- Select the documented transport protocol and local port or range.
- Restrict allowed remote addresses where appropriate.
- Enable only the network profiles that should accept connections.
- Give the rule a clear name identifying the game and its purpose.
Microsoft notes that permitting a specific application is generally less risky than leaving a port open to any program. A custom rule combining application and port restrictions can limit exposure further.
Configure port forwarding on your router
A server on a typical home network has a private LAN address. If you want direct inbound IPv4 connections from the internet, the router must forward the game's required traffic to that specific machine.
On a FRITZ!Box, the manufacturer's port-forwarding instructions describe the relevant settings under the internet sharing / port-forwarding area. Other brands may call the feature Port Forwarding, NAT Rules, or Virtual Servers.
- Assign the server a stable local address, ideally via a DHCP reservation in the router.
- Select the exact server device as the forwarding destination.
- Enter the external and internal port numbers required by the game.
- Select only the transport protocol specified by the developer.
- Save the rule and double-check the target device.
Your internet connection must also provide an externally reachable address or an alternative supported connection mechanism. A correct rule on your home router cannot bypass carrier-grade NAT on its own.
Expected result: A connection attempt from outside your home reaches the intended server service. If LAN access works but a WAN test still fails, investigate public IPv4, CGNAT, or DS-Lite.
Do not use Exposed Host or DMZ as a shortcut
If a single forwarding rule fails, exposing the entire server computer is a poor troubleshooting shortcut. FRITZ!'s Exposed Host documentation describes forwarding unsolicited inbound IPv4 requests to one device when they are not handled by another rule. That device no longer receives the normal protection of the router's firewall.
For a private game server, open specific ports rather than exposing the host. Remove obsolete rules, and avoid making RCON or web administration interfaces available to the entire internet unless there is a well-justified and secured need.
Why UDP port-checker results can be misleading
An external port test is meaningful only if it checks the same transport protocol the server uses. A successful or failed TCP handshake says nothing about whether UDP traffic can reach the same numeric port.
Check what protocol a port-checker service actually tests. For a UDP game server, a real connection attempt through the intended client—or a developer-documented server query—from a device outside your home network is often more useful than a generic TCP port test.
Test connections one layer at a time
- Local: Confirm that the server is running and accepts a connection on the host.
- LAN: Try a second computer on the same network. If it fails, inspect the host firewall and binding address.
- WAN: Only after local access works, test router forwarding and internet reachability.
- Provider: If LAN access works and forwarding looks correct, investigate the public IPv4 address, CGNAT, and DS-Lite.
- Logs: Check whether incoming packets or connection attempts arrive at the server when somebody connects from outside.
Change one layer at a time. Adding several new firewall and router rules at once makes it harder to identify the actual problem.
Port numbers are game-specific
The general networking principles apply to many game servers, but their port numbers do not. Consult up-to-date official server documentation for the particular title and version, including any separate query, remote administration, or web-interface ports. A rule that is correct for Rust will not necessarily work for Satisfactory, Euro Truck Simulator 2, or Palworld.
Related reading: check CGNAT and DS-Lite.