Networking
Port Forwarding for Game Servers: Router, CGNAT, Firewall and Testing
The complete port forwarding guide for a home game server: reserve an IP, forward the right TCP or UDP port, detect CGNAT (100.64.0.0/10), use a port-forwarding VPN, add Windows Firewall rules, test UDP properly, and a port table for ARK, Palworld, Valheim, Minecraft, Enshrouded, 7 Days to Die, Satisfactory, Project Zomboid and Rust.

Port forwarding is where most home game servers get stuck. The server runs, you can join it from your own PC, and nobody else can. This guide walks through the whole path a friend’s connection takes, from the internet to your router to Windows to the game, and how to check each step. It works for any game on this site, and there is a port table for each of them near the end.
If you only need the VPN side, How to Port-Forward a Game Server Through a VPN goes deeper on that. If you already suspect CGNAT, Hosting a Game Server Behind CGNAT compares every workaround.
What a port forward does
Every device at home has a private LAN address such as 192.168.1.50. The internet only sees your router’s one public address. When a friend connects to YOUR-PUBLIC-IP:7777, the router has no idea which device should get that traffic, so it drops it. A port forward is a rule that says: traffic arriving on this port, with this protocol, goes to that PC.
Three details decide whether it works:
- The port number. It must match the port the server is actually listening on (set in its config or launch line).
- The protocol. Most game servers use UDP. Minecraft: Java Edition uses TCP. A rule for the wrong one does nothing.
- The target PC. The rule points at a LAN address. If that address changes after a reboot, the rule points at nothing.
Forward only the ports players join on. Admin ports such as RCON, a web dashboard or a REST API should stay closed to the internet.
Step 1: give the server PC a fixed LAN address
In your router’s admin page, find the DHCP settings and add a DHCP reservation (sometimes called address reservation or static lease) for the server PC. Pick it from the list of connected devices so the router ties the address to that PC’s network card. Reboot the PC once and check with ipconfig in Command Prompt that it got the reserved address.
Use a wired connection for the server if you can. It is more stable, and the reservation follows the wired network card, not the Wi-Fi one.
Step 2: check for CGNAT before you touch any forwards
A forward on your router only helps if your router has a real public address. Many ISPs, especially mobile, 5G, satellite and fixed-wireless ones, put customers behind carrier-grade NAT (CGNAT), where many homes share one public address. Then no forward on your own router can work.
The two-minute check:
- In the router’s admin page, find the WAN or Internet IP address.
- On a PC at home, open any “what is my IP” site and note the address it shows.
- Compare them.
| Router WAN address | What it means |
|---|---|
| Same as the “what is my IP” site | You have a public IPv4 address. Port forwarding will work. |
Between 100.64.0.0 and 100.127.255.255 |
CGNAT. That range, 100.64.0.0/10, is reserved for ISP shared address space. |
10.x, 172.16–172.31, or 192.168.x |
Another NAT sits upstream: CGNAT, or a second router of your own (double NAT). |
| Different public address | Almost certainly CGNAT. |
If you have an ISP gateway and your own router, the “another NAT” case may just be double NAT. Put the ISP box in bridge or passthrough mode, or forward the port on both devices.
What to do about CGNAT
In rough order of preference:
- Ask your ISP for a public IPv4 address. Some give one free on request, some charge a small monthly fee, some refuse.
- IPv6, if your ISP, your server and all your players have it. Many do not, so do not count on it.
- A VPN with port forwarding (next section). Your PC connects out to the VPN, which CGNAT allows, and friends join the VPN’s address.
- A tunnel or relay such as a small VPS, or a game-specific relay. Valheim’s
-crossplaymode, for example, uses a relay and needs no port forward at all. - Rent a server and skip the home network entirely.
The CGNAT guide covers each option in detail, with costs.
Step 3: forward the port on your router
Every router names things differently, but the rule always has the same fields. Look for Port Forwarding, Virtual Server, NAT or Applications & Gaming.
| Field | What to enter |
|---|---|
| Name | Anything, such as “Palworld” |
| Protocol | UDP or TCP, from the port table below (or Both if the game needs both on the same number) |
| External / WAN port | The game port, such as 8211 |
| Internal / LAN port | The same number |
| Internal IP / device | The server PC’s reserved address |
Save it, and reboot the router if its manual says rules only apply after a restart. Avoid DMZ mode as a shortcut: it sends every unsolicited connection to the PC, not just the game.
UPnP can open ports automatically for some games. It is convenient but you lose track of what is open, and many dedicated servers do not use it. A manual rule is easier to troubleshoot.
Step 4: allow the port in Windows Firewall
Windows blocks unsolicited inbound traffic by default. When a server starts for the first time, Windows may ask whether to allow it; allowing it on Private networks is usually enough. The reliable way is a rule for the exact port. Open PowerShell as administrator and run one line per port, for example:
New-NetFirewallRule -DisplayName "Palworld server" -Direction Inbound -Protocol UDP -LocalPort 8211 -Action Allow
New-NetFirewallRule -DisplayName "Minecraft Java server" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow
Change the name, protocol and port to match your game. A range works too, such as -LocalPort 26900-26903. To see what you have made later, open Windows Defender Firewall with Advanced Security and look under Inbound Rules. If you use a third-party antivirus with its own firewall, it needs the same rule.
For RCON or a web admin panel used only from your own network, scope the rule to your LAN instead of opening it wide: add -RemoteAddress LocalSubnet. Do not forward those ports on the router.
Step 5: test it properly (and why UDP is tricky)
Test from outside your network. A second PC on the same Wi-Fi proves nothing about the internet path, and many routers do not even support joining your own public IP from inside (called NAT loopback or hairpinning).
- Start the server first. A port only answers if a program is listening on it. Testing with the server off always fails.
- TCP ports (such as Minecraft’s 25565) can be checked with an online open-port checker. It opens a TCP connection to your public IP; if the server accepts it, the port is open.
- UDP ports are different. UDP has no handshake, so a checker sends a packet and usually hears nothing back, even when the forward is perfect, because the game server ignores packets it does not understand. That is why most online checkers only test TCP, and why a “closed” result for a UDP game port proves very little. Do not keep changing settings because a web checker says closed.
- The best UDP test is the game itself. Have a friend join by your public IP, or join from your own laptop on a phone hotspot (mobile data, not your Wi-Fi). If the game has a server list, see whether your server appears with a ping. For Steam-based servers, the Steam client’s View → Game Servers → Favorites list can query
PUBLIC-IP:QUERYPORTfrom outside.
If it works on your LAN and fails from mobile data, the problem is almost always one of these, in this order: CGNAT, the wrong protocol, the forward pointing at an old LAN address, the Windows Firewall rule, or a second router in the way. It is rarely the game install.
Port table for the games on this site
Defaults from each game’s official documentation, as used in our guides. If you change a port in the config or launch line, forward that number instead.
| Game | Forward to the server PC | Do not forward (admin only) | Guide |
|---|---|---|---|
| ARK: Survival Ascended | UDP 7777 (game port; a second map uses another, such as 7779) | TCP 27020 (RCON) | ARK on Windows, ASA ports |
| Palworld | UDP 8211 | RCON and the REST API (8212 by default) | Palworld on Windows |
| Valheim | UDP 2456-2457 for the Steam backend; none with -crossplay (relay) |
— | Valheim on Windows |
| Minecraft: Java Edition | TCP 25565 | RCON if you enable it | Minecraft Java on Windows |
| Enshrouded | UDP 15637 (queryPort) |
— | Enshrouded on Windows |
| 7 Days to Die | TCP 26900 and UDP 26900-26903 | TCP 8080-8081 (web dashboard, telnet) | 7 Days to Die on Windows |
| Satisfactory | UDP 7777, TCP 7777 and TCP 8888 | — | Satisfactory on Windows |
| Project Zomboid | UDP 16261 and UDP 16262 | RCON (TCP 27015 by default) | Project Zomboid on Windows |
| Rust (PC) | UDP 28015 (game) and the UDP query port (28017 in our guide) | RCON (TCP 28016) and Rust+ (TCP 28082) | Rust on Windows |
Running several games on one PC? Each needs its own port, and the same-PC guide shows how to plan them.
VPN port forwarding as a CGNAT workaround
A VPN that supports incoming port forwarding gives your server a public address that is not behind your ISP’s CGNAT. Your PC opens an outbound tunnel to the VPN server, which CGNAT happily allows, and the VPN forwards your chosen ports down that tunnel. Friends connect to the VPN server’s address, not your home IP, which also keeps your home IP private.
Most privacy VPNs do not offer this at all. Look for a provider that documents port forwarding for inbound connections, and read the details before you pay for a long plan.
Port caps matter. VPN providers that offer port forwarding often cap how many ports you can forward at once, so choose your games and ports carefully. Count the ports in the table above: one ARK map and Palworld need one port each, but 7 Days to Die needs a TCP port and a four-port UDP range, Satisfactory needs three, and Rust needs two to be listed in the browser. Forward game ports only and keep RCON and dashboards off the list.
I host my own servers behind PureVPN’s port-forwarding add-on. It caps you at 15 ports, so I pick the game ports carefully and leave admin ports off the list. How the add-on works, from its port forwarding page (checked December 3, 2026):
- Port forwarding is a paid add-on to a PureVPN plan, not part of the base subscription.
- In the PureVPN Member Area, open Subscriptions and click Configure next to Port Forwarding.
- Choose Enable specific ports, enter your game ports, and click Apply Settings. PureVPN says you can open up to 15 ports at once.
- Connect the PureVPN app to a server location that supports port forwarding. PureVPN’s support article lists those locations; rules are not applied elsewhere.
- Keep the Windows Firewall rules from step 4, and give friends the VPN address and your game port.
Two things trip people up. Split tunneling: if the game server’s traffic leaves through your normal connection while you hand out the VPN address, nobody connects, so send the whole server PC (or at least the server program) through the VPN. And a kill switch will take the server offline whenever the VPN drops, which is usually what you want for a home server.
Router tips
A conventional router with a normal admin page makes all of this easier than some ISP gateways and app-only mesh systems, which may hide port forwarding or not offer it.
If the network still will not cooperate
Some connections just do not suit a home server: CGNAT with no public IP option, a landlord’s router you cannot log in to, or a game that needs more ports than your VPN allows. Renting is a reasonable answer, and the host handles the public address, the firewall and DDoS protection.
Before you hand out your address, read How to Let Friends Join Your Home Server Safely. To weigh the cost of renting, see ARK: Survival Ascended hosting compared and the server cost calculator.
FAQ
Do I need to forward TCP or UDP? Usually UDP. ARK, Palworld, Valheim, Enshrouded and Project Zomboid use UDP. Minecraft: Java Edition uses TCP. 7 Days to Die, Satisfactory and Rust use a mix, so check the table.
Is port forwarding safe? Opening a game port to the PC that runs the game is normal. Keep the server updated, use a join password, and never forward admin ports such as RCON, Remote Desktop or a web dashboard.
Why does an online port checker say my port is closed when friends can join? Most checkers test TCP. Game servers usually listen on UDP and do not reply to a checker’s test packet, so the result is meaningless for them. Trust a real join from outside.
How do I know if I am behind CGNAT? If your router’s WAN address is in 100.64.0.0/10 (100.64.x.x to 100.127.x.x), or differs from what a “what is my IP” site shows, you are behind CGNAT or another NAT.
DIY Game Hosting is an unofficial fan site. It is not affiliated with Studio Wildcard, Pocketpair, Iron Gate Studio, Coffee Stain Publishing, Mojang, Microsoft, Keen Games, The Fun Pimps, Valve or any router or VPN maker. Game names and trademarks belong to their owners.