Tested on Debian, Ubuntu, and CentOS… how to install CSF on VestaCP.
THIS SCRIPT IS FOR Vesta 0.9.8-15, Vesta 0.9.8-16, Vesta 0.9.8-17, Vesta 0.9.8-18 and Vesta 0.9.8-19.
IT IS ALWAYS A GOOD IDEA TO BACKUP EVERYTHING. BACKUP CSF + VESTA
My original post can be found here at VestaCP’s forums.
- This will install the most recent version of CSF. If you have CSF installed it will attempt to install/update to the most recent version. If you already have the latest version it will attempt to install it but you will not lose any CSF configuration changes.
- This will also overwrite the file /usr/local/vesta/web/templates/admin/panel.html (a VestaCP template file)
- This script does not install any CSF configuration settings. I would not disable testing mode until you have added VestaCP’s port into the configuration of CSF.
- This script does not remove or disable fail2ban or iptables used by Vesta
Let’s install CSF on VestaCP
wget https://vestacp.ss88.uk/Install_CSF_on_VestaCP/Install.sh -O ./Install_Tools.sh chmod 777 ./Install.sh sudo ./Install.sh
Install custom rules for proftpd and vsftpd
Head over to GitHub (I’m slowly migrating everything there) where you will need to edit one file with a few lines to help CSF block incorrect FTP logins.