Security

Unblocked in CSF but Still Blocked? Why We Built AllClear for WHM

CSF said the IP was clear, but it was still blocked. How leftover BitNinja ipset entries led us to build AllClear, a free open-source WHM plugin that finds and unblocks an IP across every firewall layer.

Updated 7 min read EDZNET Team

Unblocking an IP address on a cPanel server should take ten seconds. Search for it in CSF, click unblock, done. Except that sometimes it isn’t done: CSF says the address is clear, and the customer still can’t reach their email. This is the story of one of those blocks, why it happens, and the small open-source tool we built so it doesn’t cost anyone another afternoon: AllClear for WHM.

The Problem: “Clear” Isn’t Always Clear

We had an address we’d already unblocked in CSF that was still being dropped by the server. Searching for it again in CSF turned up the clue:

IPSET: Set:bitninja-local-incident Match:203.0.113.17

The block wasn’t in CSF’s own deny list at all. It was an entry in an ipset, a kernel-level list of addresses that firewall rules check against, created by BitNinja. CSF can see it, but its unblock button doesn’t remove it, and BitNinja doesn’t always clear its own incident entries straight away either. So the address stayed blocked until someone went digging with ipset on the command line.

Why It Happens: A Server Has Many Firewalls

A modern cPanel server rarely has just one firewall. Ours, like many, has several security layers stacked on top of each other, and each one can block an address independently:

LayerWhat it blocksHow you’d normally unblock
CSF / LFDLogin failures, port scans, its deny listsWHM > ConfigServer Security & Firewall
BitNinjaAttacks, bad bots, malware uploads, known bad IPsBitNinja dashboard or bitninjacli
fail2banRepeated failures in service logsfail2ban-client unban
cPHulkBrute-force logins to cPanel, WHM and mailWHM > cPHulk Brute Force Protection
ipset / iptables / nftablesWhatever the tools above (or anything else) left in the kernelCommand line only

Each tool only knows about its own blocks. So “unblock this IP” really means checking five or six places, in the right order, as root. That’s slow, and it’s easy to miss one, which is exactly what leaves a customer locked out after they’ve been told the problem is fixed.

What We Built

AllClear is a WHM plugin (and a shell command) that does the whole job in one place. You enter an IP address and it:

  1. Searches every layer — CSF, BitNinja, fail2ban, cPHulk, every ipset, iptables/ip6tables and native nftables — and shows exactly which entries match, including CIDR ranges that contain the address.
  2. Unblocks in the right order. The managers go first (CSF, BitNinja, fail2ban, cPHulk), so they don’t immediately put the address back.
  3. Re-scans the kernel and removes anything still left in ipset, iptables or nftables — the leftovers that caused our original headache.
  4. Shows the result, layer by layer, so you can confirm the address really is clear before you tell the customer.

Optionally, it can add a 24-hour temporary allow in CSF or a permanent BitNinja whitelist entry, for the cases where an address keeps getting re-blocked while the cause (usually an old saved password on a device) gets fixed.

When you don’t want everything cleared, every entry in the results has a checkbox. You can lift a single fail2ban ban and leave a BitNinja block in place, or take an address off an allow list that it should no longer be on.

Designed Not to Make Things Worse

A tool that deletes firewall rules as root has to be careful about what it deletes. A few rules we built in:

  • Allow-lists are never touched by a full unblock. Rules that accept traffic, and any ipset, nft set or chain named like a whitelist, can only be removed one by one, after a confirmation, and never if they cover the IP you’re working from. This one came from experience: in early testing, an address that was both blocked and on BitNinja’s own whitelist set showed the whitelist entry as removable. It was caught before anything was deleted, fixed the same day, and is now a hard rule.
  • Ranges need a deliberate tick. If an address is blocked because a whole /24 is blocked, removing that entry unblocks everyone in the range. AllClear shows it, but only removes it if you ask.
  • The browser can’t choose what gets deleted. The form only sends the IP address (and, for single removals, short entry IDs). Every rule to remove comes from a fresh scan on the server at the moment you click, so a forged request can’t delete anything the server doesn’t find for that IP.
  • Root only, and everything is logged. Each unblock is written to a root-only log with who ran it, from where, and the exact commands and results.

Before publishing, we put the code through a security review of its own: commands are run without a shell, every value shown on the page is escaped, unblocks must be submitted as a form post protected by WHM’s session token, and the plugin refuses to run if it can’t confirm the user has root access.

Why Open Source It?

Stacked firewalls are common on cPanel servers, and so is this exact problem — it comes up again and again in hosting forums. There’s no reason every server admin should have to work out the ipset commands from scratch, so AllClear is free under the MIT licence:

github.com/EDZNET/allclear-whm

Installing it is one command, as root:

curl -sL https://github.com/EDZNET/allclear-whm/releases/latest/download/allclear-whm.tar.gz | tar xz -C /root && sh /root/allclear-whm/install.sh

It then appears under WHM > Plugins > AllClear (IP unblock), and as the allclear command in the shell. Tools you don’t have installed are simply skipped. It uses cPanel’s own bundled Perl, so there’s nothing else to install. Bug reports and pull requests are welcome.

What It Means for EDZNET Customers

If you host with us, you won’t ever see AllClear — but you’ll feel it. When a device with an old saved password gets your office blocked, we can now find and clear every block in one go, and confirm it’s gone, instead of fixing one layer and hoping. If you think you’ve been blocked:

  1. Find your IP address with our What’s my IP tool (or whatsmyip.edznet.io if edznet.io won’t load for you).
  2. Send it to our support team.

Our guide, Blocked from your website, email or cPanel?, covers the common causes and how to stop it happening again.

Frequently Asked Questions

Do I need BitNinja to use AllClear?

No. It checks whichever of CSF, BitNinja, fail2ban, cPHulk, ipset, iptables and nftables are installed and skips the rest. Even with only CSF, it’s useful for finding stray ipset or iptables entries.

Does it work with Imunify360 or firewalld?

Their runtime rules are cleared through iptables and nftables like any others, but AllClear doesn’t talk to them directly, so their own configuration may put a block back. Check their dashboards too if an address keeps returning.

Which versions has it been tested on?

cPanel & WHM 138 on CloudLinux 8.10, the setup we run on our shared hosting servers, and cPanel DNSONLY 138 on Ubuntu 24.04 with CSF, BitNinja, cPHulk and nftables. Feedback from other setups is very welcome on GitHub.

Does it work on cPanel DNSONLY servers?

Yes, from version 1.3.2. On our DNSONLY server, the WHM API call that clears cPHulk brute-force blocks was refused, even for root, so earlier versions left those blocks in place. AllClear now notices if that call is refused and falls back to cPanel’s own hulk-unban-ip script, and any step that fails is shown as failed rather than quietly marked done. If you installed an earlier version, re-run the install command to upgrade.

Is it really free?

Yes. It’s MIT-licensed: use it, change it, run it on your own servers. It comes with no warranty, so review what it lists before you click unblock.

Can you build something like this for our servers?

Yes. Server tooling, WHM and cPanel plugins and WHMCS modules are exactly what our development team at edznet.dev builds.

Get AllClear on GitHub Bespoke server tooling

Relevant solutions

Questions about your setup?

Talk to the people who run the servers. We'll tell you honestly what you need — and what you don't.