L4D2 RCON: Remote Server Administration
Set up and use RCON to remotely administer your L4D2 server. Set rcon_password in server.cfg, authenticate from the in-game console, and run admin commands without direct server access.
L4D2 RCON Administration
RCON (Remote Console) lets you run server commands from the game client or a standalone tool without needing SSH access to the server.
Step 1 — Set the RCON Password
In left4dead2/cfg/server.cfg:
rcon_password "YourStrongRconPassword"
Restart the server (or exec server.cfg via the server console) to apply.
Use a strong, unique password — anyone with RCON access has full control over the server.
Step 2 — Connect via In-Game Console
- Join your server as a player
- Open the developer console (press
~or`) - Authenticate:
rcon_password YourStrongRconPassword - Run commands:
rcon say "Server message to all players" rcon changelevel c2m1_highway
All RCON commands are prefixed with rcon in the client console.
Step 3 — Remote RCON Tools
You can also connect to RCON from outside the game using standalone tools:
- mcrcon / rcon-cli — command-line RCON clients
- SourceQuery — web-based RCON clients
- Source RCON Protocol — TCP port 27015
Example with rcon-cli:
rcon-cli --host YOUR_SERVER_IP --port 27015 --password YourPassword changelevel c1m1_hotel
Common RCON Commands
| Command | Effect |
|---|---|
rcon say "message" |
Broadcast a chat message as SERVER |
rcon changelevel c1m1_hotel |
Change to a new map |
rcon mp_gamemode versus |
Change game mode (takes effect on next changelevel) |
rcon kick "PlayerName" |
Kick a player by name |
rcon status |
Show player list, IDs, and ping |
rcon sv_cheats 1 |
Enable cheats (for testing) |
rcon exec server.cfg |
Reload the config file |
rcon z_difficulty Expert |
Change difficulty |
rcon quit |
Shut down the server |
Banning Players via RCON
rcon status
Note the Steam ID from the output, then:
rcon banid 0 STEAM_1:0:12345678 kick
rcon writeid
writeid writes the ban to cfg/banned_user.cfg so it persists after restart.
To unban:
rcon removeid STEAM_1:0:12345678
rcon writeid
Security Best Practices
- Use a long, random password — RCON has no rate limiting by default
- Restrict TCP 27015 to trusted IPs via your firewall if possible:
sudo ufw allow from YOUR_ADMIN_IP to any port 27015 proto tcp sudo ufw deny 27015/tcp sudo ufw allow 27015/udp - Never share RCON credentials publicly