How to Install ConfigServer Security & Firewall (CSF)
Last modified: 2026 February 25
Overview
- As of August 31, 2025, the developers of CSF no longer maintain or support it. They have released CSF under the GPLv3 license.
- On supported cPanel & WHM versions, WebPros International, LLC maintains its own version of CSF for security and stability updates only. We do not provide help with CSF configuration or troubleshooting.
This document describes how to install the ConfigServer Security & Firewall (CSF) software via the command line. CSF is a free, third-party plugin that allows you to modify your server’s iptables rules in WHM. For more information on CSF, read CSF’s readme file.
Install CSF
- You must run these commands as the
rootuser. - CSF does not function with the
firewalldutility. To install CSF, you must first remove thefirewalldutility.
To install CSF, run the following command:
- If your server runs AlmaLinux OS, CloudLinux™, or Rocky Linux:
sudo yum install cpanel-csf - If your server runs Ubuntu®:
sudo apt install cpanel-csf
Upgrade to cPanel CSF
If your server runs version 14.x or 15.00 of the original Way to the Web/ConfigServer version of CSF and you have enabled automatic updates in CSF, the system will automatically upgrade CSF to the version that WebPros International, LLC maintains.
If your server is not eligible for an automatic upgrade, run this command to manually upgrade CSF to the version that WebPros International, LLC maintains:
- If your server runs AlmaLinux, CloudLinux, or Rocky Linux:
sudo yum install cpanel-csf - If your server runs Ubuntu:
sudo apt install cpanel-csf
Configure CSF
To configure CSF, use WHM’s ConfigServer Security & Firewall interface (WHM » Home » Plugins » ConfigServer Security & Firewall). The installation process should enable the correct ports in CSF, but we recommend that you confirm this on your server.
To use CSF, you must perform the following steps to disable testing mode:
- Click Firewall Configuration.
- In the Initial Settings section, set the Testing toggle to
Off. - Click Change.
- Click Restart csf+lfd.
- Click Return.
Uninstall CSF
To uninstall CSF, run the following command:
- If your server runs AlmaLinux, CloudLinux, or Rocky Linux:
yum remove cpanel-csf - If your server runs Ubuntu:
apt remove cpanel-csfNote:When you uninstall CSF, the CSF configuration files in the
/etc/csf/and/usr/local/csf/directories remain on the server. To remove these files when you uninstall CSF, run this command instead:apt purge cpanel-csf