How to Install / Use CSF - A better IPTables

CSF (ConfigServer Firewall) is a free firewall that can be installed which relies on iptables and its modules. It has an interface that is built on WHM as a plugin which makes it easier for everyday users to add firewall rules to your server to lock it down from potential attackers. It also has much more configurable options than the built in firewall that comes with WHM/cPanel.

 

Installation

  1. Login to your server via SSH
  2. Download the installer:
    $ wget http://www.configserver.com/free/csf.tgz
  3. Extract the .tgz file:
    $ tar -zxvf csf.tgz

Run the installer:
$ sh csf/install.sh

Adding Rules

  1. Login to WHM
  2. Access the CSF Interface: WHM >> Plugins >> ConfigServer Security&Firewall
  3. Once in the interface you want to edit the firewall config using the built in editor and make any required changes (Make sure to change testing from 1 to 0 to enable the firewall).

After making the required edits, select "Change" at the bottom of the screen. You will then restart the firewall in order for the changes to take place.

Congrats, CSF is installed and configured!

  • 56 Users Found This Useful
Was this answer helpful?

Related Articles

Adding Additional Modules to PHP via WHM

Additional modules can be added to PHP via the WHM control panel. Below are instructions on how...

Video Tutorial: Create Hosting Account in WHM

Please do not hesitate to contact us if you need any further assistance.

cPanel: How to Clear Brute Force Logs via SSH

Login into your VPS via SSH and enter: echo "delete from brutes; delete from logins;" | mysql...

Video Tutorial: Managing DNS Zones in WHM

Please do not hesitate to contact us if you need any further assistance.

Video Tutorial: What is the difference between WebHost Manager (WHM) and cPanel

Please do not hesitate to contact us if you need any further assistance.