The Forest Port Forwarding and NAT Guide
Port forwarding only belongs to a home-hosted server. A remote game host normally owns the router and exposes the ports through its panel. The official dedicated-server guide documents the following ports for The Forest:
| Purpose | Protocol | Port |
|---|---|---|
| Steam | TCP and UDP | 8766 |
| Game | TCP and UDP | 27015 |
| Query | TCP and UDP | 27016 |
Home-hosted server
- Give the server PC a stable LAN address or DHCP reservation.
- Forward TCP and UDP 8766, 27015, and 27016 to that address.
- Allow the same ports through Windows Firewall or the host firewall.
- Use the public address for an external join test; the private 192.168.x.x address only works inside the LAN.
Some routers need a hairpin-NAT or split-DNS workaround when a player tests from the same network. Test from a phone hotspot or another external connection before changing game settings.
Windows firewall example
# PowerShell as Administrator
New-NetFirewallRule -DisplayName "The Forest Steam" -Direction Inbound -Protocol TCP -LocalPort 8766 -Action Allow
New-NetFirewallRule -DisplayName "The Forest Steam UDP" -Direction Inbound -Protocol UDP -LocalPort 8766 -Action Allow
New-NetFirewallRule -DisplayName "The Forest Game" -Direction Inbound -Protocol TCP -LocalPort 27015,27016 -Action Allow
New-NetFirewallRule -DisplayName "The Forest Game UDP" -Direction Inbound -Protocol UDP -LocalPort 27015,27016 -Action Allow
Hosted server
Check the provider's assigned address, ports, security group, and server status. Do not add port-forwarding rules to your home router for a remote machine. If a provider maps external ports to different internal ports, give players the external values from the panel.
When players still cannot connect
- Confirm the process is running and
server.cfguses the same ports. - Check the operating-system firewall and router/provider firewall separately.
- Check for carrier-grade NAT or an ISP that blocks inbound connections.
- Verify the server name, public address, password, and client/server versions.
- Perform a real join from outside the server network; a UDP scan alone is inconclusive.
Related guides
- Dedicated-server setup
- server.cfg ports and settings
- Server not showing troubleshooting
- The Forest server wiki
Official source
Verify the port list and configuration path in the official The Forest dedicated-server guide.
Want to avoid home NAT entirely? Host The Forest with Supercraft.