ConfigServer Security & Firewall (CSF) is a powerful and flexible firewall configuration tool designed to enhance server security. While it's commonly used with control panels like cPanel, CSF can also be installed and configured on a bare Linux server for advanced traffic control, intrusion detection, and email rate limiting. In this guide, we’ll walk you through the steps to install CSF on a bare Linux server without any hosting control panel.

1. Install Required Packages

Make sure basic tools are installed:

# For RHEL-based (CentOS, AlmaLinux, Rocky)
$sudo yum install perl iptables perl-libwww-perl perl-LWP-Protocol-https -y

# For Debian/Ubuntu
$sudo apt update
$sudo apt install perl iptables libwww-perl liblwp-protocol-https-perl -y

2. Download and Install CSF

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

3. Test for Compatibility

$sudo perl /usr/local/csf/bin/csftest.pl

4. Enable CSF and LFD

$sudo systemctl enable csf
$sudo systemctl enable lfd
$sudo systemctl start csf
$sudo systemctl start lfd

5. (Optional) Allow SSH and Web Ports

Edit /etc/csf/csf.conf:

TCP_IN = "22,80,443"
TCP_OUT = "22,25,80,443"

6. Then restart CSF:

$sudo csf -r

 

?האם התשובה שקיבלתם הייתה מועילה 1 משתמשים שמצאו מאמר זה מועיל (1 הצבעות)