How to Enable/Disable CSF firewall and LFD

How to Enable/Disable CSF Firewall (Configserver security and firewall) on a cPanel Server

CSF is a most commonly used advanced firewall to secure Linux servers. It is better to keep the firewall enabled on the server because it will protect the server from external attacks. You can enable/disable the firewall either from frontend (WHM) or from server backend (SSH). Follow the below steps to Enable/disable CSF firewall.
 


 
Steps to Enable/Disable server firewall on a cPanel/WHM Server (Frontend)

1. Log in to WHM (Webhost Manager) as ‘root’

2. Search for ‘ConfigServer Security & Firewall’ in WHM search bar
 

Search CSF in WHM

Search CSF in WHM


 
3. Click on ‘ConfigServer Security & Firewall’ under ‘Plugins’

Home » Plugins » ConfigServer Security & Firewall

4. Click on ‘Firewall Enable’ to Enable CSF and LFD

Firewall Enable = Enables csf and lfd if previously Disabled

5. Click on ‘Firewall Disable’ to Disable CSF and LFD

Firewall Disable = Completely disables csf and lfd
 

Enable and Disable CSF and LFD

Enable and Disable CSF and LFD


 


 
Commands to Enable/Disable CSF firewall and LFD

1. Log into your Linux Server as ‘root’ user

2. Type ‘csf -x’ command to Disable CSF and LFD

3. Type ‘csf -e’ command to Enable CSF and LFD
 

[root@server ~]# csf -x
csf and lfd have been disabled

[root@server ~]# csf -e
csf and lfd have been enabled