Kategorie: Linux

Installation of CSF Firewall in Debian system 11

The following tutorial describes how to install the CSF firewall on a Debian system 11
We will do everything in the console by executing a few simple commands.

We start the terminal and update the system packages:

sudo apt update

We install the necessary packages:

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

Pobieramy CSF

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

unpack

sudo tar -xvzf csf.tgz

We install in the system:

cd csf && sh install.sh

The next step is to run it in the system:

sudo systemctl start csf

The next step is to update the perl rules:

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

We add csf to the system autostart:

sudo systemctl enable csf

We go to the initial configuration.

edit file:

At section

# Allow incoming TCP ports

And

# Allow outgoing TCP ports

We set the ports we want to have unlocked, for example:

If we want to block an ip address, we add it to the file:

sudo nano /etc/csf/csf.deny

After making the changes, reload the firewall with the command:

sudo csf -r

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu