---
title: "CS 1.6 Ban Systems Compared (AMXBans, Simple Bans, Built-in)"
excerpt: "Engine bans vs AMX Mod X amx_ban vs AMXBans MySQL: how each stores a ban, where the ban list lives, and which one to run for a single server versus a network."
category: "administration"
tags: "bans, comparison"
image: ""
read_time: "9 min read"
---
<p>\"Ban systems\" on CS 1.6 are really three layers that people conflate: the engine's own ban list, AMX Mod X's <code>amx_ban</code> built on top of it, and full MySQL ban managers like AMXBans. They store bans in different places, survive restarts differently, and scale very differently. Picking the wrong one for your setup means bans that vanish on restart or a database you did not need. Here is what each actually does.</p>
<h2>1. Layer one: the engine ban list</h2>
<p>The GoldSrc engine bans without any addon, using two commands and two files. SteamID bans go through <code>banid</code>, IP bans through <code>addip</code>:</p>
<pre>banid 0 STEAM_0:1:12345 kick // permanent SteamID ban, kick now
addip 0 203.0.113.44 // permanent IP ban (0 = permanent)
writeid // flush SteamID bans to banned.cfg
writeip // flush IP bans to listip.cfg</pre>
<p>The critical gotcha: bans are held <strong>in memory</strong> until you <code>writeid</code>/<code>writeip</code>. If you <code>banid</code> someone and the server restarts before a write, the ban is gone. <code>banned.cfg</code> and <code>listip.cfg</code> are executed at startup to reload them, and <code>sv_filterban 1</code> must be set for the filter to actually block. This layer has no reason, no duration tracking, no admin name — just IDs.</p>
<h2>2. Layer two: AMX Mod X amx_ban</h2>
<p>The AMX Mod X admin base (<code>admin.amxx</code>) wraps the engine ban in a usable command with a duration and a reason:</p>
<pre>amx_ban <name|#userid> <minutes> [reason] // 0 minutes = permanent
amx_banip <name|#userid> <minutes> [reason]
amx_addban <steamid> <minutes> [reason] // ban an offline SteamID
amx_unban <steamid></pre>
<p>This is the right tool for the overwhelming majority of servers. It records who banned whom, for how long, and why; timed bans expire on their own; and it still calls the engine underneath so <code>sv_filterban</code> enforcement applies. Bans are stored in the AMXX <code>bans</code> file under <code>addons/amxmodx/</code>. It gives you an in-game <code>amx_banmenu</code> too — pair it with the <a href="/plugins/csb-admin-menu">CSB Admin Menu</a> for a point-and-click workflow. What it does <em>not</em> do is share bans across multiple servers or give you a web page to manage them.</p>
<h2>3. Layer three: AMXBans and MySQL managers</h2>
<p>AMXBans is a plugin plus a MySQL database plus a web front-end. Every ban is a database row, so a ban on one server is instantly enforced on every server pointed at the same database, and you get a website where admins issue and lift bans, attach demos and screenshots, and players can appeal. This is what a <strong>network</strong> of servers wants. The cost is real: you run and secure a MySQL database (see <a href="/tutorials/backup-configs-bans-stats">backing it up</a>), install and configure the web panel, and accept that a database outage affects banning. For a single server it is overkill; for five servers sharing an admin team it is the only sane option.</p>
<h2>4. Side-by-side</h2>
<table>
<thead><tr><th>Feature</th><th>Engine banid</th><th>amx_ban</th><th>AMXBans (MySQL)</th></tr></thead>
<tbody>
<tr><td>Storage</td><td>banned.cfg / listip.cfg</td><td>AMXX bans file</td><td>MySQL database</td></tr>
<tr><td>Timed bans</td><td>minutes field, manual</td><td>yes, auto-expire</td><td>yes, auto-expire</td></tr>
<tr><td>Reason / admin recorded</td><td>no</td><td>yes</td><td>yes, plus demos/appeals</td></tr>
<tr><td>Shared across servers</td><td>no</td><td>no</td><td>yes</td></tr>
<tr><td>Web management</td><td>no</td><td>no</td><td>yes</td></tr>
<tr><td>Setup effort</td><td>none</td><td>ships with AMXX</td><td>high (DB + panel)</td></tr>
<tr><td>Good for</td><td>quick manual ban</td><td>one server</td><td>a network</td></tr>
</tbody>
</table>
<h2>5. Which to run</h2>
<ul>
<li><strong>One server, casual</strong> — <code>amx_ban</code>. It is already installed, it does everything you need, and there is nothing extra to secure.</li>
<li><strong>One server, but you want a ban history and menu</strong> — still <code>amx_ban</code>, plus the admin menu. Do not add a database for a single box.</li>
<li><strong>Multiple servers, shared admins</strong> — AMXBans or an equivalent MySQL manager, so a ban is enforced everywhere and admins work from one panel.</li>
</ul>
<p>Whichever you pick, verify <code>sv_filterban 1</code> is set, because all three ultimately rely on the engine to refuse the connection.</p>
<h2>Common errors</h2>
<ul>
<li><strong>Bans disappear after a restart</strong> — you used raw <code>banid</code> without <code>writeid</code>, so the ban never hit <code>banned.cfg</code>. Use <code>amx_ban</code>, which persists for you, or remember to write.</li>
<li><strong>Banned player still connects</strong> — <code>sv_filterban 0</code>, or the player switched SteamID (common on non-Steam servers — ban the IP too, or use a validation setup like <a href="/tutorials/install-reunion">Reunion</a>).</li>
<li><strong>amx_ban says \"unknown command\"</strong> — <code>admin.amxx</code> is not loaded, or your admin entry lacks the ban flag. Check <a href="/tutorials/plugins-ini-load-order">plugins.ini</a> and <code>users.ini</code> flags.</li>
<li><strong>AMXBans web panel and in-game disagree</strong> — the plugin and the panel point at different databases or table prefixes. They must share one schema.</li>
<li><strong>IP ban blocks innocent players</strong> — you IP-banned a shared/CGNAT address. Prefer SteamID bans on Steam servers; reserve IP bans for repeat evaders.</li>
</ul>
<h2>Verification</h2>
<p>Ban a test account and prove the ban survives the round-trip. With <code>amx_ban</code>, ban yourself for one minute, confirm the kick, then check the ban is written:</p>
<pre>amx_addban STEAM_0:1:99999 1 "test"
// then confirm the engine knows it
listid</pre>
<p><code>listid</code> should list the SteamID. Restart the server and run <code>listid</code> again — a persistent ban is still there. If it vanished, the write step failed and you have your answer.</p>