Clone CSF Firewall Configuration to New cPanel Server


This article will provide a guide to clone CSF Firewall configuration to new cPanel server.

Goal: Install CSF firewall on new cPanel server using configuration settings from different cPanel server's existing CSF installation. This guide assumes user has root-level access to an existing cPanel VPS or cPanel Dedicated Server with CSF already installed and configured.

If you have multiple cPanel servers with CSF firewall setup and running, you may prefer to copy existing CSF configuration to newly-installed CSF on cPanel server. Benefits of copied CSF configuration to new installations would be environment consistency and time saved by eliminating manual configuration processes.

Clone CSF Firewall Configuration to New cPanel Server

To clone CSF Firewall configuration to new cPanel server from existing server, complete these steps below:

  1. From the terminal, login as root to the existing cPanel server with CSF (with configuration to copy) already running..
  2. Copy the following files from this server:
    /etc/csf/csf.conf
    /etc/csf/csf.allow
    /etc/csf/csf.deny
    /etc/csf/csf.ignore
    /etc/csf/csf.fignore
    /etc/csf/csf.mignore
    /etc/csf/csf.pignore
    /etc/csf/csf.rignore
    /etc/csf/csf.signor
    /etc/csf/csf.suignore
  3. Login as root to the new cPanel server (where CSF configuration will be copied to).
  4. Upload all files from previous step to /etc/csf/ of new CSF server, overwriting the existing files in /etc/csf folder.
  5. On the same (new) server, issue the following command to restart CSF using the newly uploaded configuration files:
    csf -r
  6. CSF will now automatically be configured with settings cloned from previous installation (on existing cPanel server).

Conclusion

You have now completed your task of clone CSF firewall configuration to new cPanel server.

  • csf, configserver
  • 4 Пользователи нашли это полезным
Помог ли вам данный ответ?

Related Articles

Remove a Service from ChkServd Monitoring for cPanel Servers

This guide requires root user account in server. In some circumstances, ChkservD cPanel...

Assigning a Dedicated IP Address to a Subdomain using WHM

To assign a dedicated IP address to a subdomain, perform the following steps: Step 1: Add the...

How to Uninstall Installatron in WHM cPanel Server

This guide will show you how to quickly uninstall Installatron software from WHM/cPanel server....

How to Install Installatron in WHM cPanel Server

This guide will show you how to download and install Installatron on your cPanel/WHM server. To...

How to Install Softaculous with cPanel/WHM

This guide will show you how to download and install Softaculous on your cPanel/WHM server. To...