The ability to ban is built into every Rust server out of the box, preventing unwanted players from connecting to and playing on your server. Of course, you can also unban a player that you have previously banned if you would like them to be able to play on your server again.
Banning a Player or Steam ID
There are two methods to ban a player from your server.
The first method is via their SteamID. Each Steam user has an ID associated with their account. When banned, that account will be unable to connect to your server again, regardless of their username.
The second method is via their ingame username. This method gets the SteamID of the connected user and bans them via that. Due to this, it is only possible to ban via username while the user is online.
COMMAND | DESCRIPTION |
---|---|
/banid "Steam_ID" ["optional_reason"] |
Bans a user based on their SteamID. |
/ban "user_name" ["optional_reason"] |
Pulls the Steam ID of the connected user with said username. Then bans the SteamID. |
Unbanning a Steam ID
You may only unban users via their Steam ID as the server does not keep track of banned usernames. The following command can be used to unban a Steam ID from your server.
COMMAND | DESCRIPTION |
|
Unbans a user based on their SteamID. Unlike the ban commands, do not include quotes around the userid. |
Viewing Banned Steam IDs
To view a list of what Steam ID's are currently banned on your server, use the following command.
COMMAND | DESCRIPTION |
/banlistex |
Will display a list of all currently banned users alongside the reason if present. |
The Banlist File
The banlist is stored in the server's FTP File Access under server/my_server_identity/cfg/bans.cfg
. This file is mainly used for importing/exporting ban player information. Before making any changes to this file, be sure to follow these steps:
- Stop your server entirely, this will prevent any issues when changing the file.
- Make any edits to the file you wish.
- Save the file.
- Restart your server.