Adobe Introduces Powerful Generative AI Tools in Photoshop
Artificial Intelligence

Adobe Introduces Powerful Generative AI Tools in Photoshop Beta

by Veronica
June 1, 2023
2

Adobe Photoshop beta AI will take your creativity to the...

Read more
Adobe Photoshop's Generative Fill Feature

Exploring the Power of Adobe Photoshop’s Generative Fill Feature

June 1, 2023
ChatGPT app

The Easiest Way to Download ChatGPT App Free

June 1, 2023
Nvidia Unveils Futuristic Gaming Experience at Computex 2023

Nvidia Unveils Futuristic Gaming Experience at Computex 2023, Blending Gaming and AI

May 29, 2023
NVIDIA and Microsoft Partner to Accelerate AI

NVIDIA and Microsoft Partner to Accelerate AI

May 25, 2023
ChatGPT login

ChatGPT Login Guide to Free OpenAI Access

May 20, 2023
Everything you should know about Tongyi Qianwen

Tongyi Qianwen – Everything you should know about Alibaba AI

April 17, 2023
ChatGPT Plugins concepts and use cases

ChatGPT Plugins: Concepts and Use Cases

April 28, 2023
LocalAI Drop-In Replacement for OpenAI's REST API

LocalAI: A Drop-In Replacement for OpenAI’s REST API

May 17, 2023
Microsoft research Reveals GPT-4 AI

Microsoft research Reveals GPT-4 AI Shows Promising Signs of Common Sense and Human-Like Reasoning

May 20, 2023
How to create AutoGPT plugins

How to create AutoGPT plugins

May 5, 2023
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Linux

How to Install and Configure CSF Firewall on Debian 11

by Cloudbooklet
January 29, 2022
in Linux
Reading Time: 6 mins read
How to Install and Configure CSF Firewall on Debian 11
Share on FacebookShare on TwitterShare on WhatsAppShare on Telegram

Install and configure CSF (Config Server Firewall) and secure your Debian 11.

CSF is a popular security tool for Linux to secure the server with stateful packet inspection firewall (SPI), intrusion detection, a login failure daemon, DDOS protection, and control panel integration.

You might also like

Best PHP-FPM Configuration - Easy and Simple Calculation

Best PHP-FPM Configuration – Easy and Simple Calculation

June 1, 2023
How to Use ChatGPT in Linux Terminal

How to Use ChatGPT in Linux Terminal

May 19, 2023

In this guide you are going to learn how to install and setup CSF and also the essential commands to use the firewall on Debian 11

Initial Setup

Update server packages to latest.

sudo apt update
sudo apt dist-upgrade -y

If you are already using UFW which is a a basic firewall, remove UFW using the below command.

sudo apt remove ufw

Install Dependencies

Install the required dependencies that are used by CSF.

sudo apt install perl zip unzip libwww-perl liblwp-protocol-https-perl

Install Sendmail which is used by CSF for communication.

You can refer this documentation for detailed setup of Sendmail.

sudo apt install sendmail-bin

Now you have all dependencies to install and configure CSF.

Install CSF

Navigate to /usr/src directory.

Download the latest package using wget.

sudo wget https://download.configserver.com/csf.tgz

Extract the downloaded package.

sudo tar -xzvf csf.tgz

Now install CSF.

cd csf
sudo sh install.sh

Now you will receive an output as below which indicates the successful installation.

Installation Completed

Verify if the required iptables modules are present.

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

You will receive an output similar to the one below.

Testing ip_tables/iptable_filter…OK
Testing ipt_LOG…OK
Testing ipt_multiport/xt_multiport…OK
Testing ipt_REJECT…OK
Testing ipt_state/xt_state…OK
Testing ipt_limit/xt_limit…OK
Testing ipt_recent…OK
Testing xt_connlimit…OK
Testing ipt_owner/xt_owner…OK
Testing iptable_nat/ipt_REDIRECT…OK
Testing iptable_nat/ipt_DNAT…OK
RESULT: csf should function on this server

You can check the CSF version using the following command.

sudo csf -v

csf: v14.15 (generic)
*WARNING* TESTING mode is enabled - do not forget to disable it in the configuration

Configure CSF

Once the firewall is installed it is configured to run in TESTING mode by default.

To disable TESTING mode you need to make changes to the /etc/csf/csf.conf file.

sudo nano /etc/csf/csf.conf

Locate the line TESTING = “1”, and change the value to “0”.

TESTING = "0"

Locate the line RESTRICT_SYSLOG = “0”, and change the value to “3”. This means only members of the RESTRICT_SYSLOG_GROUP may access syslog/rsyslog files.

RESTRICT_SYSLOG = "3"

Hit CTRL+X followed by Y and ENTER to save and exit the file.

Reload CSF.

csf -ra

Additional Configuration

To allow additional ports connections.

Edit /etc/csf/csf.conf

Locate the TCP_IN directive and add your ports.

# Allow incoming TCP ports
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,3306"

I have added the MYSQL port to connect to a remote server.

Restart CSF after each change.

sudo csf -ra

Essential Commands to Manage CSF

Start CSF

sudo csf -s

Stop CSF

sudo csf -f

Restart CSF

You must restart CSF each time the configuration file changes.

sudo csf -ra

Allow IP address

Use the -a option to allow IP address.

sudo csf -a 10.0.2.12

Deny IP address

Use the -d option to allow IP address.

sudo csf -d 10.0.2.12

Remove IP from allow list

sudo csf -ar 10.0.2.12

Remove IP from deny list

sudo csf -dr 10.0.2.12

Check if IP is blocked

sudo csf -g IP-ADDRESS

Remove IP from block

sudo css -tr IP-ADDRESS

Allow IP lists

Add your IPs listed on a separate line in the allow file /etc/csf/csf.allow.

Deny IP lists

Add your IPs listed on a separate line in the allow file /etc/csf/csf.deny.

Conclusion

Now you have learned how to secure your server by installing and configuring CSF in Debian 11.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.

Tags: Cloud SecurityDebian
Share1Tweet1SendShare
Cloudbooklet

Cloudbooklet

Help us grow and support our blog! Your contribution can make a real difference in providing valuable content to our readers. Join us in our journey by supporting our blog today!
Buy me a Coffee

Related Posts

Install WordPress with Docker Compose, Nginx, Apache with SSL

WordPress Deployment Made Easy: Docker Compose, Nginx, Apache, SSL Setup Guide

May 20, 2023
How to Install WordPress on Docker

How to Install WordPress on Docker for Windows, macOS, and Linux

May 20, 2023
How to install python on Ubuntu

How to Install Python on Ubuntu 22.04?

May 31, 2023
what's new in node.js 20

What’s new in Node.js 20?

April 23, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

  • Trending
  • Comments
  • Latest
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

May 30, 2023
DragGAN AI editing Tool Install and Use DragGAN Photo Editor

DragGAN AI editing Tool Install and Use DragGAN Photo Editor

May 27, 2023
Bard API key

Everything You Need to Know About Google’s Bard API Key

May 20, 2023
Install PHP 8.1 on Ubuntu

How to Install or Upgrade PHP 8.1 on Ubuntu 20.04

May 17, 2023
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

79
Upgrade PHP version to PHP 7.4 on Ubuntu

Upgrade PHP version to PHP 7.4 on Ubuntu

28
Install Odoo 13 on Ubuntu 18.04 with Nginx - Google Cloud

Install Odoo 13 on Ubuntu 18.04 with Nginx – Google Cloud

25
Best Performance WordPress with Google Cloud CDN and Load Balancing

Best Performance WordPress with Google Cloud CDN and Load Balancing

23
Best PHP-FPM Configuration - Easy and Simple Calculation

Best PHP-FPM Configuration – Easy and Simple Calculation

June 1, 2023
ChatGPT Shared Links

ChatGPT Shared Links: A New Way to Share Your Conversations

June 1, 2023
Deepfake

Deepfake: The Rise of Synthetic Media

June 1, 2023
How to Setup SSH Keys on Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

May 31, 2023

Popular Articles

  • DragGAN The AI-Powered Image Editing Tool

    DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

    1523 shares
    Share 609 Tweet 381
  • DragGAN AI editing Tool Install and Use DragGAN Photo Editor

    403 shares
    Share 161 Tweet 101
  • Auto-Photoshop-Stable Diffusion-Plugin: A New Way to Create AI-Generated Images in Photoshop

    71 shares
    Share 28 Tweet 18
  • InternGPT: A New Way to Interact with ChatGPT

    56 shares
    Share 22 Tweet 14
  • Microsoft research Reveals GPT-4 AI Shows Promising Signs of Common Sense and Human-Like Reasoning

    100 shares
    Share 40 Tweet 25
Latest Technology Trends in Artificial Intelligence and Machine Learning with Cloudbooklet

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS

Cloudbooklet © 2023 All rights reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.