New

EmeraldHost 2.0 is here: faster, more intuitive, and made for everyone - the new panel!

Learn more
Guides
How to Kick and Ban Players on Your Left 4 Dead 2 Server
Left 4 Dead 2Left 4 Dead 2Kick & Ban Players

How to Kick and Ban Players on Your Left 4 Dead 2 Server

Kick and ban players on a Left 4 Dead 2 server

3 min read
Jul 30, 2026

You can remove players either through the server console in the dashboard or – if SourceMod is installed – directly in the game through the SourceMod commands.

List the players

  1. Open the server console
    Open the console of your server via the dashboard.

  2. Show the player list
    Enter the following command:

    status
    

    The output shows the userid and the SteamID for every connected player. You need these values for the commands below.

Commands in the server console

Command Description
status Show server and player information including userid and SteamID
kick <player name> Remove a player from the server by name
kickid <userid|SteamID> [reason] Remove a player from the server by ID
banid <minutes> <SteamID> [kick] Ban a player (0 = permanent)
addip <minutes> <IP> Ban an IP address
removeid <SteamID> Lift the ban on a SteamID
removeip <IP> Lift the ban on an IP address
writeid Save SteamID bans permanently
writeip Save IP bans permanently
changelevel <map name> Change the map
say <message> Send a message to all players

Kick a player

kick <player name>

Instead of the name you can also use the userid or the SteamID:

kickid STEAM_0:1:12345678 Reason

A kicked player is removed from the server but can rejoin immediately.

Ban a player

banid 60 STEAM_0:1:12345678 kick

The duration in minutes goes in front of the SteamID, 0 bans permanently. The optional kick removes the player from the server right away – without it the ban only takes effect on the next connection attempt.

Save bans permanently

Enable RCON

RCON lets you run the same commands from outside the dashboard.

  1. Stop the server
    Stop your server via the dashboard.

  2. Open server.cfg
    Open the following file via SFTP:

    /left4dead2/cfg/server.cfg
    
  3. Set a password
    Add the following line and choose a secure password:

    rcon_password "your-password"
    
  4. Start the server
    Save the file and start your server.

Commands through SourceMod

With SourceMod installed you can manage players directly from within the game. How to set up SourceMod and give yourself admin rights is described under Add Mods and Add Admin.

Command Syntax Required flag
sm_kick <#userid|name> [reason] c (kick)
sm_ban <#userid|name> <minutes|0> [reason] d (ban)
sm_banip <ip|#userid|name> <time> [reason] d (ban)
sm_addban <time> <steamid> [reason] m (rcon)
sm_unban <steamid|ip> e (unban)
sm_who [#userid|name] b (generic)
sm_map <map> g (changemap)

Examples

sm_kick "player name" Rule violation
sm_ban #12 60 Rule violation
sm_addban 0 STEAM_0:1:12345678 Rule violation

Lift a ban

Through the server console:

removeid STEAM_0:1:12345678
removeip 123.45.67.89

Afterwards run writeid or writeip again so the change is saved permanently.

With SourceMod:

sm_unban STEAM_0:1:12345678
sm_unban 123.45.67.89
Written byEmeraldHost Team
Last updated on Jul 30, 2026 Edit on GitHub

Did this article help you?

Your feedback helps us improve our guides.

Help shape the guides

€10.00 in credit for every new guide, €5.00 for every improvement.

Contact Support

Create a support ticket and our team will get back to you as soon as possible – personal and professional.

Go to Support
1257 members online

Discord Community

Connect with other players, get quick help from the community, and stay up to date with the latest news.

Join Discord
Left 4 Dead 2

Ready to get started?

Rent your Left 4 Dead 2 Server now

Join our Discord community 1257 members online right now