Installing & Uninstalling CSF WHM Firewall

CloudLinux

CloudLinux offers a secure version of Linux that provides advanced functionality for shared hosting environments. CloudLinux integrates with cPanel & WHM, and it provides detailed resource management tools and other improvements to system management and stability.

You can purchase CloudLinux from the cPanel Store. For more information about CloudLinux, visit the CloudLinux website.

ConfigServer software

Many of our Technical Support Analysts recommend that you use ConfigServer Security & Firewall (CSF), a free product that ConfigServer provides. CSF contains a stateful packet inspection (SPI) firewall, a login and intrusion detection mechanism, and a general security application for Linux servers.

Warning:

CSF does not function with the firewalld utility. If you install CSF, you must remove the firewalld utility. To do this, run the yum remove firewalld command.

To install CSF, perform the following steps:

  1. Log in to your server as the root user via SSH.

  2. Run the cd /root command to change to the root directory.

  3. Run the following command to download CSF:

    wget https://download.configserver.com/csf.tgz
    

     

  4. Run the tar -xzf csf.tgz command to decompress the downloaded file.

  5. Run the cd csf command to change directories.

  6. To begin the CSF installation, run the ./install.cpanel.sh command.

To configure CSF, use WHM’s ConfigServer Security & Firewall interface (WHM » Home » Plugins » ConfigServer Security & Firewall). The installation script should enable the correct ports in CSF, but we recommend that you confirm this on your server.

After you configure CSF, you must disable testing mode. To take CSF out of testing mode, perform the following steps:

  1. Click Firewall.

  2. Change the value of Testing from 1 to 0.

  3. Click Change.

 
 
You can uninstall CSF firewall by running following script from the terminal.
  1. In cPanel servers: Code: cd /etc/csf
  2. sh uninstall.sh.
Warning:

CSF does not function with the firewalld utility. If you install CSF, you must remove the firewalld utility. To do this, run the yum remove firewalld command.

  • CSF Firewall
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Force Server Backup

Force Server Backup: /usr/local/cpanel/bin/backup --force

How To Free Disk Space On cPanel - WHM Server

1. Delete user cPanel backups If you have the backup feature in cPanel enabled, chances are your...

Kernel Care Update

kcarectl --update  

Tucows OpenSRS Domain IPs

This is commonly caused by the port numbers that the OpenSRS API operates on being blocked by...

CodeGuard IP Addresses

Codeguard.com - US region:54.236.233.46 54.236.233.2854.174.91.3454.174.153.21254.174.115.171