[How-to] CSF Support in Hestia CP

CSF is a firewall bundle. An alternative to firewallD & Fail2ban (part of stock Hestia CP install).

For those who prefer the former above the latter - here is a simple tutorial how to enable the CSF & Hestia CP integration.

Prerequisities:

  • Disabled firewallD via Hestia CP

CSF Install steps:

  1. cd /usr/src
  2. rm -fv csf.tgz
  3. wget https://download.configserver.com/csf.tgz
  4. tar -xzf csf.tgz
  5. cd csf
  6. sh install.sh
  7. Execute the below snippet
  8. sh install.hestia.sh

CSF to Hestia CP integration sed snippet:

find . -type f -exec sed -i 's/VESTA/HESTIA/g' {} + && \
find . -type f -exec sed -i 's/Vesta/Hestia/g' {} + && \
find . -type f -exec sed -i 's/vesta/hestia/g' {} + && \
rename 's/VESTA/HESTIA/' * && \
rename 's/vesta/hestia/' *

CSF Autoupdates are working flawlessly.

If you would like to have native CSF & Hestia CP support, feel free to raise your hand @ CSF FORUM

  • CSF
  • FirewallD

0 voters

Hi @martineliascz

Thanks for sharing the tutorial with us! I’ll try to make it sticky on top :).

1 Like

Hi
Have tried the guide on fresh install on debian 9.11. But get errors
[email protected]:/usr/src/csf# find . -type f -exec sed -i β€˜s/VESTA/HESTIA/g’ {} + &&

find . -type f -exec sed -i β€˜s/Vesta/Hestia/g’ {} + &&
find . -type f -exec sed -i β€˜s/vesta/hestia/g’ {} + &&
rename β€˜s/VESTA/HESTIA/’ * &&
rename β€˜s/vesta/hestia/’ *
sed: -e expression #1, char 1: unknown command: `▒’
[email protected]:/usr/src/csf#

Which linux os and version, did it work for you.

Hi @napisok

I use the very same version as you do - Debian Stretch 9.11.

According to the provided output - it seems like you have done wrong copy-paste.

Please retry with proper copy-paste and get back to us.

Hi
rename β€˜s/vesta/hestia/’ *
Give the error
sed: -e expression #1, char 1: unknown command: `▒’

Done following Step

  1. cd /usr/src
  2. rm -fv csf.tgz
  3. wget https://download.configserver.com/csf.tgz
  4. tar -xzf csf.tgz
  5. cd csf
  6. sh install.sh
  7. find . -type f -exec sed -i β€˜s/VESTA/HESTIA/g’ {} + &&
    find . -type f -exec sed -i β€˜s/Vesta/Hestia/g’ {} + &&
    find . -type f -exec sed -i β€˜s/vesta/hestia/g’ {} + &&
    rename β€˜s/VESTA/HESTIA/’ * &&
    rename β€˜s/vesta/hestia/’ *

Thanks for reply, @napisok

Please try to enter the aforementioned commands manually.

The issue lies in the quote character:
scrnsht
Unfortunately I don’t have required permissions here to fix the attached snippet :frowning:

@martineliascz fixed the quoting in the snippet.

1 Like

Thanks it worked. But after that you need to install:
apt install libwww-perl -y

@napisok - I am glad it’s working for you.

Installing Perl web modules is optional - depending on your CSF configuration. However I do strongly recommend installing them as all future CSF updates will be done over HTTPS instead of HTTP.

If you enjoy CSF integration in Hestia CP - please consider visiting CSF FORUM to secure native CSF & Hestia support in the future.