Port Configuration and Firewall Rules
All ports required for a public GMod server including game, RCON, Steam master server, and multi-server configurations.
Required Ports
| Port | Protocol | Direction | Purpose |
|---|---|---|---|
27015 |
UDP | Inbound | Game traffic (player connections) |
27015 |
TCP | Inbound | RCON remote console |
26901 |
UDP | Outbound | Steam master server heartbeat |
1200 |
UDP | Outbound | Steam master server (legacy) |
27005 |
UDP | Outbound | Client outbound (not typically firewalled inbound) |
27020 |
UDP | Inbound/Outbound | SourceTV/HLTV (only needed if enabled) |
The minimum required set for a public server is:
- UDP
27015inbound — players cannot connect without this - UDP
26901and1200outbound — server will not appear in the server browser without these
Setting the Game Port
The port is set at launch with -port:
-port 27015
This binds both the UDP game port and the TCP RCON port to 27015. The IP binding is controlled separately with +ip:
+ip 0.0.0.0 # Listen on all interfaces
+ip 10.0.0.5 # Listen on a specific interface only
For Pterodactyl, the panel configures port allocation for you. The 27015 default can be overridden in the panel's port settings.
RCON Port
RCON uses TCP on the same port as the game (default 27015). It does not use a separate port. When configuring your firewall, ensure both UDP and TCP are open on 27015.
Steam Master Server Registration
For your server to appear in the Steam server browser and in-game server list, outbound UDP traffic must be allowed to Steam's master servers:
UDP 26901 outbound # Primary Steam master server
UDP 1200 outbound # Secondary/legacy Steam master server
These are outbound connections initiated by your server. If your host's firewall blocks all outbound traffic by default, you must explicitly allow these. If your server does not appear in the browser after 5–10 minutes with a valid GSLT token, blocked outbound ports are the most likely cause.
SourceTV
SourceTV allows external spectating and demo recording. It is disabled by default. If you enable it:
tv_enable 1
tv_port 27020 // Default SourceTV port
tv_name "My Server SourceTV"
Open UDP 27020 inbound if you enable SourceTV.
Running Multiple Servers
When running more than one server on the same machine or node, each server must bind to a unique port. The convention is to increment by 10:
| Server | Game Port |
|---|---|
| Server 1 | 27015 |
| Server 2 | 27025 |
| Server 3 | 27035 |
In Pterodactyl, allocate a new port for each server instance. Set the -port launch flag in each server's startup command accordingly, or use the panel's port variable if the egg supports it.
Each server also needs its own GSLT token. Tokens are per-server, not per-account.
Recommended Firewall Rules (inbound)
# Minimum public server
UDP 27015 ALLOW
TCP 27015 ALLOW
# Broader range (covers default port and some variants)
UDP 27000:27015 ALLOW
TCP 27015 ALLOW
Verifying Ports Are Open
From an external machine, test that the game port is reachable:
# Test UDP connectivity (requires nmap)
nmap -sU -p 27015 <your-server-ip>
# Test TCP (RCON)
nc -zv <your-server-ip> 27015
From within the server container, verify the process is listening:
ss -ulnp | grep 27015 # UDP
ss -tlnp | grep 27015 # TCP
If ss shows the port is bound but external connections fail, the block is at the host's firewall or network layer, not the server process.