Skip to content

Install CSF

These steps explain how to install ConfigServer Firewall on your system. There are two possible ways to install CSF which are listed below:


The Patch method attempts to take much of the work out of installing CSF. It installs all prerequisites automatically, and sets CSF to start with TESTING MODE disabled. After CSF is installed using the patcher; then the Docker and OpenVPN patches will automatically be installed next.

The Manual method requires you to manually install all prerequisites using your OS package manager, and then manually downloading the latest copy of CSF and extracting / installing it on your system. You will have to run the patcher after you have installed CSF.




Install: Using Patch

If you would like to install ConfigServer Firewall using this repo's patcher; download the patch:

git clone https://github.com/Aetherinox/csf-firewall.git


Set the permissions for the install.sh file:

sudo chmod +x /csf-firewall/patch/install.sh


Run the script:

sudo ./csf-firewall/patch/install.sh


If ConfigServer Firewall is not already installed on your system; you should see:

  Installing package iptables
  Installing package ipset
  Installing package ConfigServer Firewall

  Patch installer will now start ...


After the patcher has installed CSF; it will then automatically install the Docker and OpenVPN patches. All you will need to do after; is ensure CSF is up and running.

Please proceed to the section Configure & Start CSF




Install: Manually

Prerequisites

  • A Linux server running CentOS, Debian, Ubuntu, or any other compatible Linux distribution.
  • Root access or a user account with sudo privileges.
  • Perl installed on your server. If Perl is not installed, you can install it by running the following commands:
  • For CentOS/RHEL:

    sudo yum install perl ipset
    

  • For Debian/Ubuntu:

    sudo apt-get update 
    sudo apt-get install perl ipset
    


Download and Install CSF

To download and install CSF, follow these steps:

  • Log in to your server via SSH.
  • Download the latest version of CSF using the wget command:
    wget https://download.configserver.com/csf.tgz
    
  • Extract the downloaded archive:
    tar -xzf csf.tgz
    
  • Navigate to the extracted directory:
    cd csf
    
  • Run the installation script:
    sudo sh install.sh
    


CSF will now be installed on your server, along with its Web UI (ConfigServer Firewall & Security) if you have a control panel like cPanel or DirectAdmin installed.




Next Steps

Instructions for editing the CSF config file and starting CSF for the first time