How to Install CSF Firewall via WHM/cPanel?

  WHM

Introduction:

Securing your server is crucial to protect it from unauthorized access and malicious attacks. One essential aspect of server security is configuring a firewall to control incoming and outgoing traffic. In WHM/cPanel environments, ConfigServer Security & Firewall (CSF) is a popular choice for firewall management due to its robust features and ease of use. This guide will walk you through the process of installing and configuring CSF on a newly installed WHM/cPanel server using commands.

Prerequisites:

Before you begin configuring the firewall, ensure that you meet the following prerequisites:

  1. Access to WHM/cPanel: You should have access to the WHM/cPanel interface with root privileges
  2. Basic Command Line Knowledge: Familiarity with basic Linux command-line operations is required to follow the steps outlined in this guide.

Configuration Steps:

Step 1:Access to your WHM with root credentials

Step 2: Navigate to the Installation Directory:

cd /usr/local/src/

Step 3: Download CSF:

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

Step 4: Extract CSF Archive:

tar -xzf csf.tgz

Step 5: Navigate to CSF Directory:

cd csf

Step 5: Run the Installation Script:

sh install.sh

Step 6: Search for firewall in WHM homepage, you will get the plugin “Configserver security & firewall”

In this under csf, we have firewall configuration where we need to turn off the testing settings .

Once it is done firewall has been enable in your cpanel server.

Conclusion:

You have installed and configured ConfigServer Security & Firewall (CSF) on your WHM/cPanel server. By implementing a robust firewall solution, you have taken a significant step towards enhancing the security of your server and protecting it from various threats.

LEAVE A COMMENT