Install CSF firewall on Ubuntu Server
First, install libwww-perl package needed for CSF firewall
1 |
apt -y install libwww-perl |
Install CSF with
1 2 3 4 5 |
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
1 2 3 |
/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
1 |
vi /etc/csf/csf.conf |
Modify following settings
1 2 3 4 5 |
UI = "1" UI_PORT = "8282" UI_USER = "username" UI_PASS = "password" UI_ALLOW = "0" |