This guide goes well with these (in order):

  1. Understand Your Public IP
  2. TCP vs UDP
  3. How to Set Up Port Forwarding

How to Set Up Port Forwarding

Before you continue, make sure you have read: If you are behind CG-NAT, port forwarding will NOT work. This guide assumes:
  • You have a public IPv4 address
  • You are not behind CG-NAT
  • You have access to your router

What Port Forwarding Actually Does

When someone connects to: YourPublicIP:27960 Your router must decide:
  • Which internal machine should receive the traffic?
  • Which port should it be delivered to?
Port forwarding creates a rule like this: PublicIP:27960 → 172.30.0.7:27960 One external port can only point to one internal IP at a time.

Step 1: Set a Static Internal IP (Very Important)

If your server's internal IP changes, your port forward will break. You have two options:
  1. Set a static IP directly on the server
  2. Create a DHCP reservation in your router (recommended)
Many routers require the device's MAC address for reservation.

How to Find Your Local IP and MAC Address (Windows)

  • Press Win + R, type cmd, and hit Enter.
  • In the Command Prompt, type: ipconfig /all and hit Enter.
Look for:
  • IPv4 Address → Example: 172.30.0.7
  • Physical Address → Example: 02-C0-D5-85-4C-DF (When you use it, it should most likely be written 02:C0:D5:85:4C:DF)
The Physical Address is your MAC address. You may need this when creating a DHCP reservation in your router. Look for gateway, like:
  • 192.168.1.1
  • 192.168.0.1
  • Or the gateway listed in ipconfig. In our example 172.30.0.1
Login with your router credentials (Search default username and password for your router model on Google, or check documents from your ISP).

How to Find Your Local IP and MAC Address (Linux)

Linux network commands depends on your distribution and setup, but the most universal way is using the ip command or ifconfig.
  • Open a terminal.
  • Type: ip addr and hit Enter.
  • Look for your network interface (usually named eth0, wlan0, or similar - Generally don't run a server on wireless (wlan0), my network here is on wireless though).
  • To get the gateway, type: ip r
Look for:
  • dhcp src → Example: 10.13.37.92
  • link/ether → Example: e8:8d:a6:df:5c:0f
Look for gateway, like:
  • 192.168.1.1
  • 192.168.0.1
  • Or the gateway listed in ip r. In our example, from steamdeck here 10.13.37.1
Login with your router credentials (Search default username and password for your router model on Google, or check documents from your ISP).

Step 3: Find the Port Forwarding Section

It may be called:
  • Port Forwarding
  • Virtual Server
  • NAT
  • Applications & Gaming
Every router looks different. If you need model-specific instructions, visit: https://portforward.com They have step-by-step guides for most router brands.

Step 4: Create the Port Forward Rule

Field Example Value
Service Name GameServer
External Port 27960
Internal IP 172.30.0.7
Internal Port 27960
Protocol TCP, UDP, or Both
Read this explainer for difference between TCP and UDP: TCP vs UDP Explained

A Full Example on a Router

  1. After logging in, we navigate to, and expand Advanced
  2. Click Port Forwarding, and ensure it is enabled - Click +ADD SERVICE
  3. Fill in name, IP and internal and external ports. (The start and end is in case you need to do a range, like 27960-27965
  4. Above you could also choose a connected client by clicking the CONNECTED DEVICE button
  5. Click Save
Make sure:
  • The internal IP matches your server
  • The correct protocol is selected (many games use UDP)
Save the rule.

Step 5: Allow the Port in Your Firewall

Port forwarding alone is not enough. Your server's firewall must allow incoming traffic on that port. On Windows:
  • Open Windows Defender Firewall
  • Go to Advanced Settings
  • Click on Inbound Rules
  • ActionNew Rule
  • Select Port
  • Select UDP then specify your port, our example: 27960
  • Ensure you Allow connection
  • Choose which network profile. Usually this would not matter for a desktop at home. Select all.
  • Give it a name and click Finish
  • Correctly added and opened, will show a green icon next to your new rule
If the firewall blocks it, the router cannot fix that.

Step 6: Test From Outside Your Network

Important:
  • You cannot reliably test using your own public IP from inside your LAN
  • Some routers do not support NAT loopback
Test using:
  • A mobile phone on 4G/5G
  • A friend's connection
  • An online port checker, such as DNSChecker . Note: UDP does not use a connection handshake like TCP, so port checkers cannot reliably determine if a UDP port is open.
Test: YourPublicIP:27960 If it fails:
  • Re-check your internal IP
  • Confirm the server is running (It should be active and listening on the specified port, just forwarding won't be enough if nothing is actively listening)
  • Confirm firewall rules
  • Confirm you are not behind CG-NAT

Common Mistakes

  • Forwarding to the wrong internal IP
  • Forgetting DHCP reservation
  • Opening the wrong protocol (TCP vs UDP)
  • Testing from inside the same network
  • Being behind CG-NAT

Advanced: Hosting Multiple Servers

You cannot forward the same external port to multiple internal machines. But you can do this: 27960 → 172.30.0.7:27960 27961 → 172.30.0.8:27960 Different external ports → different internal machines - Same internal port.

Final Checklist

  • Public IP confirmed
  • Not behind CG-NAT
  • Static internal IP set
  • Correct port forward rule created
  • Firewall rule added
  • Tested from outside the network
If all of the above are correct - it will work. If it doesn't, 90% of the time the issue is either:
  • Wrong internal IP
  • Firewall blocking it
  • CG-NAT
Port forwarding is simple in theory - but unforgiving in configuration.