Left 4 Dead 2 Server Port Forwarding
Open the correct firewall ports for an L4D2 dedicated server: UDP 27015 for game traffic, TCP 27015 for RCON, and the auxiliary UDP range for Steam communications.
Left 4 Dead 2 Port Forwarding
L4D2 uses the Source engine networking stack. The same port handles both game traffic and Steam queries.
Required Ports
| Port | Protocol | Purpose |
|---|---|---|
| 27015 | UDP | Game traffic and Steam server browser query |
| 27015 | TCP | RCON (remote console) |
| 27000–27030 | UDP | Steam client communications (map downloads, relay) |
| 4380 | UDP | SourceTV (optional — only if using SourceTV) |
For most servers, opening UDP 27015 and TCP 27015 is sufficient for players to connect and for RCON to work.
Opening Ports with UFW (Ubuntu/Debian)
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw reload
If you want to cover the full Steam UDP range:
sudo ufw allow 27000:27030/udp
Opening Ports with firewalld (CentOS/RHEL)
sudo firewall-cmd --permanent --add-port=27015/udp
sudo firewall-cmd --permanent --add-port=27015/tcp
sudo firewall-cmd --reload
Running Multiple Servers on One Machine
Each instance needs a separate port. Increment by 1:
| Instance | Game Port | RCON Port |
|---|---|---|
| Server 1 | 27015 | 27015 |
| Server 2 | 27016 | 27016 |
| Server 3 | 27017 | 27017 |
Launch each with -port 27016 etc.
Checking Ports Are Open
From an external machine:
# Test UDP (game)
nmap -sU -p 27015 YOUR_SERVER_IP
# Test TCP (RCON)
nc -zv YOUR_SERVER_IP 27015
Cloud Provider Firewalls
On AWS, DigitalOcean, Hetzner, Vultr, and similar providers there is a separate cloud-level firewall (security groups or cloud firewall) independent of the OS firewall. Both layers must allow the ports. Check your provider's control panel if ports appear open at the OS level but are still unreachable from outside.