How to Setup ConfigServer Security and Firewall (CSF) in CentOS 7

In this article, We going to see how to setup ConfigServer Security and Firewall (CSF) on CentOS 7. Linux servers ConfigServer Security & Firewall shortly know as (CSF) is a login/intrusion detection, stateful packet inspection firewall (SPI) and security application. It is a most popular protection suite but this not helped officially yet on CentOS 7.
FirewallD is a cover for iptables to enable more friendly management of iptables rule it is not an iptables replacement. Most of the users have difficulties with the firewalld for their requirements and are returning back to iptables. For CentOS 5 and 6 Iptables was the standard firewall. The following commands will help you how to disable firewalld, install IP tables and install the CSF dependencies.
Note: You need to run the command as root or via the sudo.
Stop and disable firewalld
To stop and disable the firewalld use the following command.
1 2 |
systemctl stop firewalld systemctl disable firewalld |
Install iptables
Install iptables by the following command.
1 |
yum -y install iptables-services |
Files needed by iptables.
Create supported files required by iptables using the following command.
1 2 |
touch /etc/sysconfig/iptables touch /etc/sysconfig/iptables6 |
Start iptables
Now start iptables using the following command.
1 2 |
systemctl start iptables systemctl start ip6tables |
Enable iptables at boot
Now enable iptables using the following command.
1 2 |
systemctl enable iptables systemctl enable ip6tables |
Install the CSF dependencies
To secure your iptable need to install the CSE dependencies by the following command.
1 |
yum -y install wget perl unzip net-tools perl-libwww-perl perl-LWP-Protocol-https perl-GDGraph -y |
Download and start the CSF installer.
Now download and start the CSF installer using the following command.
1 2 3 4 5 |
cd /opt wget https://download.configserver.com/csf.tgz tar -xzf csf.tgz cd csf sh install.sh |
Remove the installed files.
If you like to remove installed files use the following command.
1 2 3 |
cd /opt rm -rf /opt/csf rm /opt/csf.tgz |
CentOSCentOS 7FirewallFirewallD
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]