CSGO: Kick, Ban, and Unban Players
In this article
Kicking and Banning Players
When it comes to banning players you have two options that we’ll walk through.
Option 1: Using Admin Commands (recommended)
The easiest way to ban someone is by utilizing the built-in admin functionalities in the server. To do so, follow these steps:
Adding yourself as an admin
- 1
- Go to your DatHost Control Panel
- 2
- Click Edit on your CS:GO server
- 3
- Go to the Mods & Plugins page found on the left menu
- 4
- Activate SourceMod if it isn’t already and then add yourself as an admin in the SourceMod Admins section.
-
- 6
- Save and Reboot for changes to take effect.
Banning/kicking someone from the menu interface
Go into the game and type !admin
to be presented with a menu. From there you can select if you want to kick or ban someone.
Banning/kicking someone using chat triggers
When you are an admin, you can simply use chat commands if you don’t want to go through the interface.
Banning chat trigger: /ban <#userid|name> <minutes|0> [reason]
Ban example: /ban s1mple 0 no cheaters allowed
Kicking chat trigger: /kick <#userid|name> [reason]
Kick example: /kick s1mple no cheaters allowed
The number determines how long the ban should be in minutes, use 0 for permanent. You can either use the name of the player, or the user ID that can be found when typing status
into the console.
Option 2: Manually from the Console
Using the admin interface is the recommended way of kicking and banning, but if you wish to use the console instead that is also an option. Simply enter the following commands into the server console.
Ban IP address: addip 0 123.456.78.90;writeip
Ban SteamID: banid 0 STEAM_0:1:234567890;writeid
The number (0) represents how long the ban should be, use 0 for permanent or specify a number in minutes.
You can get the player’s credentials (SteamID and IP address) by typing status
into the console. When banning an IP address, make sure to remove the port number (the numbers after the colon).
If you wish to do this from the in-game console you could also pair this with the RCON functionality. Read more here about how to use commands in the in-game console using RCON.
Unbanning Players
You can get a list of the banned players by typing listid
(for SteamID bans) and listip
(for IP bans) into the server console. If you have the RCON password, you can also type this into the in-game console. Read more here about how to use commands in the in-game console using RCON.
Chat triggers for admins:
Unban chat trigger: /unban <steamid|ip>
Unban example: /unban STEAM_0:1:234567890
Server console commands:
removeip 123.123.123
(replace 123.123.123 with the actual IP address)
removeid STEAM_0:1:234567890
(replace STEAM_0:1:234567890 with the actual SteamID).
Additionally, you can unban every SteamID on the server using the following console command (either in the server console, or in-game console using RCON): removeallids
There isn’t a way to unban all IP bans the same way, so you would have to do that manually - or locate the file banned_ip.cfg
in the File Manager and remove all lines.
Issue: Players being randomly banned
Sometimes you can find yourself in a situation where a player has seemingly been randomly banned from your server without you actually executing the ban yourself.
The CS:GO server has a built-in function to ban people when entering the wrong RCON password too many times, to secure the server from being maliciously targeted with brute-force attacks.
Unfortunately, this also come with the caveat of players being mistakenly banned. There are two known ways of being banned by “RCON hacking attempts”:
- 1
- Entering the wrong RCON password too many times.
- 2
- Opening the server connection details in the browser.
The second point is the most common way of being mistakenly banned. If you open the server connection details in your browser rather than typing it into the console, it will ban that person's IP for RCON hacking attempts. That can easily be misclicked if you for example sent the connect address in Discord and it was marked as a link.
Unfortunately, that’s just how the RCON protocol works, and nothing you can do much about - other than being more careful when sharing the connection details by example formatting it in a way that it doesn’t get marked as a link.