Removing a ban is fiddly because a ban can live in three different places, and clearing it from one does not touch the others. A player still blocked after you "unbanned" them is almost always banned somewhere you did not look. This covers the engine ban list, AMX Mod X commands, and database-backed bans, with the exact commands that remove each and persist the change.
1. Know which kind of ban you have
There are three independent systems:
- Engine SteamID bans — added with
banid, saved to the id ban file withwriteid. - Engine IP bans — added with
addip, saved to the ip ban file withwriteip. - Plugin/SQL bans — an AMXX ban plugin storing bans in its own file or a MySQL table, independent of the engine list.
List the engine bans first so you know what you are dealing with:
listid listip
listid prints every banned SteamID; listip every banned IP. If the player's ID or IP is not in either list, the ban is a plugin/SQL ban and the engine commands below will not help.
2. Remove an engine SteamID ban
Two steps, and the second is the one people skip:
removeid STEAM_0:1:12345678 writeid
removeid drops the ban from the running server's memory; writeid rewrites the id ban file (commonly banned_user.cfg, or banned.cfg on older builds) so the removal survives a restart. Skip writeid and the ban comes back on the next map change or reboot, because the file still lists it and is re-read at startup. You can also removeid by the ban's slot number shown in listid.
3. Remove an engine IP ban
The IP equivalents, same two-step pattern:
removeip 203.0.113.45 writeip
writeip saves the IP list (commonly listip.cfg or banned_ip.cfg). IP bans are blunt — they can catch a whole household or an ISP CGNAT pool — so if you are unbanning because you hit an innocent bystander, prefer SteamID bans in future. Note the engine can also short-circuit IP bans with sv_filterban; that cvar decides whether the list blocks or allows, so an unexpected ban behaviour can trace back to it.
4. The AMX Mod X way
From in-game as an admin, AMX Mod X exposes an unban command:
amx_unban 203.0.113.45
Be aware of a real limitation: amx_unban in the stock admin plugin operates on IP bans and runs removeip/writeip for you. It does not reliably clear a SteamID ban — for that you still use the console removeid + writeid above, or a ban-manager plugin that wraps SteamID unbanning in a menu. A maintained suite such as the CSB Ban Manager or the CSB Admin Menu gives you a searchable ban list and a one-click unban so you do not fat-finger a raw command.
5. SQL / plugin bans are separate
If you run a database-backed ban system (the common AMXBans-style setup), the ban lives in a MySQL table, not in the engine files, and the engine removeid will not touch it. Unban through that system's own tool — its web panel, its in-game menu, or a direct DELETE on the bans table keyed by SteamID. Clearing the engine list and leaving the SQL row is the number-one reason a "removed" ban re-applies the moment the plugin re-syncs its bans back into the engine on the next map.
Common errors
- Ban returns after a restart — you ran
removeid/removeipwithoutwriteid/writeip. The file still holds the ban and is re-read at boot. amx_unban"worked" but they are still banned — it cleared an IP ban but the block is a SteamID ban. Use consoleremoveid+writeid.- Unbanned in-game, re-banned next map — a SQL/plugin ban re-synced into the engine. Remove it from the database, not just the engine list.
removeidsays no such ban — wrong ID format or the ban is only an IP ban. Checklistidandlistipfor the exact entry.- Whole group of players unbanned by accident — you removed an IP range ban. IP bans are coarse; verify with
listipbefore and after.
Verification
After unbanning, list the relevant table and confirm the entry is gone:
listid listip
Then restart the server and run them again — if the entry is still absent, your writeid/writeip (or database delete) stuck and the unban is permanent. Have the player reconnect to confirm. If they still cannot join, the ban lives in a system you have not cleared yet; work through all three sources above. To ban correctly in the first place, see finding a SteamID and banning with persistence.









