cPanel WHM

CSF command not found in WHM cPanel server

Some of you may face strange issues with CSF firewall on cPanel WHM 11.38.x in which the csf command does not work.

# csf -r

bash: csf: command not found...

# /usr/sbin/csf

nothing found..

The CSF plugin though was successfully added to the WHM's AppConfig. There were no modifications in the CSF files nor in WHM.

Updating WHM and re-installing CSF latest version, removing  csf.conf present at /var/cpanel/apps  did not helped much.

After searching for solution online, one post on CSF forums attracted my attention. After reading complete discussion, I came to conclusion that the issue with perl scripts and latest cPanel WHM updates. The auto perl scripts are not added in the cPanel WHM.

To resolve the issues with CSF:

1. Take backup of csf.conf, csf.allow and csf,deny files.

2. Update CSF using following command

curl -s | perl

Note: CSF should be install on the server before executing above command.

The CSF files should be updated.

Now try using CSF command which should work like a charm.

Abhijit Sandhan

Love to Automate, Blog, Travel, Hike & spread Knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button