- Install CSF Firewall
- Install CSF firewall on Ubuntu Server
- Unban an IP from CSF Firewall
- Block Country in CSF firewall
- csf error path to iptables is either not set or incorrect
- How to run docker with csf firewall
How to use CSF Firewall
Firewall Configuration
- Disable IP Block Alerts in CSF Firewall
- Allow Passive FTP in Cpanel Server with CSF
- Enable UI in CSF Firewall on CentOS
Csf Requirments
On CentOS/RHEL
yum install -y perl perl-libwww-perl perl-Time-HiRes unzip bind-utils
On Debian/Ubuntu
apt -y install libwww-perl
Install CSF firewall
cd /usr/local/src wget https://download.configserver.com/csf.tgz tar -xzf csf.tgz cd csf sh install.sh
Configure some basic settings for CSF
/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/SMTP_BLOCK\s*=.*/SMTP_BLOCK = \"1\"/g" /etc/csf/csf.conf /bin/sed -i "s/LF_GLOBAL\s*=.*$/LF_GLOBAL = \"1800\"/g" /etc/csf/csf.conf /bin/sed -i "s/LF_SCRIPT_ALERT\s*=.*$/LF_SCRIPT_ALERT = \"1\"/g" /etc/csf/csf.conf /bin/sed -i "s/PT_ALL_USERS\s*=.*$/PT_ALL_USERS = \"1\"/g" /etc/csf/csf.conf /bin/sed -i "s/TESTING = \"1\"/TESTING = \"0\"/g" /etc/csf/csf.conf
Restart csf
csf -r
Block an IP
csf -d IP_ADD
Whitelist an IP
csf -a IP_ADD
Leave a Reply