A server on the internet gets knocked on all day: SSH logins with guessed passwords, scans for open ports, requests from addresses with a bad reputation. CSF is the doorman that decides what gets in. It is one of the most widely used firewalls with cPanel because it understands cPanel’s services and adds its own management page to WHM.
What CSF is made of #
| Part | What it does |
|---|---|
| csf | The firewall itself: opens allowed ports, closes the rest and applies allow and deny lists |
| lfd (Login Failure Daemon) | Reads login logs continuously and blocks an address that keeps failing, temporarily or permanently |
| The WHM page | Manages settings and lists inside WHM without SSH |
| Configuration files | Chiefly /etc/csf/csf.conf for settings, plus csf.allow and csf.deny for the lists |
A note about ConfigServer #
The original developer, ConfigServer, has shut down, but cPanel now provides CSF as a plugin in WHM’s Manage Plugins, where it is installed and updated. ConfigServer’s other tools, such as Explorer and ConfigServer Mail Manage, are no longer available; alternatives to Explorer are in browsing server files.
Installing from WHM #
WHM › cPanel › Manage Plugins

- Open Manage Plugins under cPanel in the sidebar, or search for Plugins.
- Find the card “ConfigServer Security & Firewall for cPanel”, with its version underneath.
- Click Install WHM waits for the install to finish and shows the result.
- Open the firewall it appears under Plugins in WHM as ConfigServer Security & Firewall.
If the server already has an older CSF installed by hand from ConfigServer’s site, do not install it twice. Check its version at the top of its WHM page, and if you need to move to the current build, copy /etc/csf first.
The first five things after installing #
| Order | What to do | Why |
|---|---|---|
| 1 | Add your fixed IP under Quick Allow | So lfd does not block you after a mistyped password |
| 2 | Review TCP_IN and TCP_OUT in Firewall Configuration | Make sure cPanel, mail and any service you use are open; see opening a port in CSF |
| 3 | Run Check Server Security | Lists known weak points in the server’s setup |
| 4 | Set TESTING = 0 | In testing mode the rules are flushed every 5 minutes, so there is no real protection |
| 5 | Set the alert address LF_ALERT_TO | So you are told when an address is blocked or root logs in |
CSF and cPHulk together? #
Yes, they work side by side. cPHulk protects the cPanel, WHM and mail logins; lfd in CSF watches a wider set of logs, including SSH and FTP. If a customer cannot reach the server, check both: cPHulk and the csf -g command in CSF commands.
Three things to remember #
- CSF is installed today from WHM through Manage Plugins, not by downloading from ConfigServer’s site.
- First step, always: your IP on the whitelist, then the ports, then testing mode off.
- Warnings after installation, such as RESTRICT_SYSLOG, have simple fixes in their own guides.
What server owners ask us #
Is CSF free?
Yes. It installs as a plugin from Manage Plugins at no extra cost.
Do I need CSF if my provider has an external firewall?
An external firewall protects ports, but lfd adds automatic blocking of password guessers, which external firewalls do not usually do.
What if CSF blocks me?
Log in through the server console in your provider’s panel and run csf -dr your-ip, then csf -a your-ip.
Does CSF slow the server down?
Its overhead is normally light. Very large block lists can add load, so do not block huge ranges without need.