When hosting a server on a home network port forwarding is required in order to direct traffic to the host computer. One way to think of it is that when there are multiple devices (e.g. computers and phones) connected to the LAN, the outside internet does not know which device is the Unturned server. In this case port forwarding specifies which LAN device is the host.
Each Unturned server uses three consecutive ports while running. The first is used for game traffic, the second for server list queries, and the third for communicating with the Steam backend services.
By default 27015, 27016, and 27017 are used. Setting a different value with the
Port command uses that value, value + 1 and value + 2. Recommended
Port command settings are 27015 for the first server, 27018 for the second server, 27021 for the third server, so on and so forth.
Local Device Address¶
Forwarding the ports directs them to a LAN address, i.e. the computer hosting the server. To determine the local IP on Windows:
- Press Windows + R to open the Run dialog.
cmdand press enter.
ipconfigin the command prompt and press enter.
- Find the
Wireless LAN adapter Wi-Fior
Ethernet adapter Ethernetheader.
- Look for the
IPv4 Addressvalue and make note of it. This is the local address to forward the ports to. It likely looks something like
How to Forward Ports¶
Instructions vary by router, but should be doable from the web browser without any extra tools or software. This third-party website has a thorough list of routers with simple steps for each model: https://portforward.com/router.htm
In general the steps are along the lines of:
- Connect to router via web browser.
- Login with home admin credentials.
- Find Port Forwarding menu.
- Find the option to add a new rule.
- Name the new rule something related to Unturned for reference.
Input 27015 as the starting port(s) and 27017 as the ending port(s).
On some routers it might not be possible to input multiple ports within a single rule. In that case multiple rules can be setup; one for each of the three port.
Enable TCP and UDP protocols.
- Set destination internal IP to the local host address.
- Save the new rule.