How to fix CSF’s error Another app is currently holding the xtables lock

The error should be looking as below:

You have an unresolved error when starting csf:
Error: Error processing command for line [339] (6 times): [Another app is currently holding the xtables lock. Perhaps you want to use the -w option?], at line 339 in /usr/sbin/csf

You need to restart csf successfully to remove this warning, or delete /etc/csf/csf.errorRead the rest

Configure CSF on CentOS 7

Install needful packages if you haven’t yet

yum install wget vim perl-libwww-perl.noarch perl-Time-HiRes -y

Download and install CSF

cd /usr/src/
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Run test:

cd /usr/local/csf/bin/
perl csftest.pl

Disable default Centos 7 firewall if you have it installed

systemctl stop firewalld
systemctl disable firewalld

Disable testing mode

cd /etc/csf/
vim csf.conf
Read the rest