Install CSF firewall on Ubuntu Server
First, install libwww-perl package needed for CSF firewall
apt -y install libwww-perl
Install CSF with
cd /usr/local/src wget https://download.configserver.com/csf.tgz tar -xzf csf.tgz cd csf sh install.sh
Change following settings in csf.conf file
/bin/sed -i "s/RESTRICT_SYSLOG\s*=.*$/RESTRICT_SYSLOG = \"3\"/g" /etc/csf/csf.conf /bin/sed -i "s/SYSLOG_CHECK\s*=.*$/SYSLOG_CHECK = \"3600\"/g" /etc/csf/csf.conf /bin/sed -i "s/TESTING = \"1\"/TESTING = \"0\"/g" /etc/csf/csf.conf
If you need GUI enabled, edit file
vi /etc/csf/csf.conf
Modify following settings
UI = "1" UI_PORT = "8282" UI_USER = "username" UI_PASS = "password" UI_ALLOW = "0"