Friday, September 16, 2022

ຕິດຕັ້ງ CSF Firewall ໃນ Ubuntu 20.04

ປະຕິບັດຕາມຂັ້ນຕອນດັ່ງນີ້
Install CSF
1.

apt-get update -y

2.

apt-get install sendmail dnsutils unzip git perl iptables libio-socket-ssl-perl libcrypt-ssleay-perl 
libnet-libidn-perl libio-socket-inet6-perl libsocket6-perl -y

3.

wget http://download.configserver.com/csf.tgz

4.

tar -xvzf csf.tgz

5.

cd csf
bash install.sh

6.

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

Configure CSF
7.

nano /etc/csf/csf.conf


8.

TESTING = "0"
RESTRICT_SYSLOG = "3"
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995"
# Allow incoming UDP ports
UDP_IN = "20,21,53,80,443"
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,53,113,123"
# Allow incoming PING. Disabling PING will likely break external uptime
# monitoring
ICMP_IN = "1"

9.

csf -r

Enable CSF Web UI
10.

nano /etc/csf/csf.conf

11.

#Enable Web UI
UI = "1"
#Listening Port
UI_PORT = "8080"
#Admin username
UI_USER = "admin"
#Admin user password
UI_PASS = "your-password"
#Listening Interface
UI_IP = ""

12.

nano /etc/csf/ui/ui.allow

13.

your-server-ip
remote-machine-ip

14.

csf -r
service lfd restart

15. Now, open your web browser and type the URL http://your-server-ip:8080.

Src: https://www.atlantic.net/vps-hosting/how-to-install-csf-firewall-on-ubuntu-20-04/

Subscribe

  • RSS Atom

ອອນລາຍ: 1 | ມື້ນີ້: 13 | ວານນີ້: 25 | ທິດນີ້: 93 | ເດືອນນີ້: 872 | ປີນີ້: 11832 | ລວມ: 78935