Coders Tent

Syed Ashik Mahmud - Pro System Admin and Malware Cleaner

  • Home
  • About Me
  • Contact
  • DMCA
  • Home
  • About Me
  • Contact
  • DMCA
VPS Security

Installing and configuring ConfigServer Security & Firewall (CSF)

December 4, 2026 August 10, 2019 coderstent

Config Server Firewall (CSF) is a Stateful Packet Inspection (SPI) firewall, Login/Intrusion Detection and Security application for Linux servers.

It’s is a security tool that can protect your server against attacks, such as brute force, and improve server security.

This application will work as a WHM plugin and is free. Follow these instructions to complete a basic CSF installation:

1. Install CSF: Log into your server as root, using SSH.


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

You will see “Installation Completed”.


cd ..
rm -Rfv csf/ csf.tgz

2. Configure CSF: Login to your server via WHM as root and go to the bottom left menu. In the Plugins section, go to ConfigServer Security Firewall.

Then, in the “csf – ConfigServer Firewall” section (on the right panel), click on “Firewall Configuration”.

# Port filtering configuration – IPv4 Port Settings #

The following ports are opened by default:

TCP_IN =
20,21,22,25,53,80,110,143,443,465,587,993,995,
2077,2078,2082,2083,2086,2087,2095,2096,26

TCP_OUT =
20,21,22,25,37,43,53,80,110,113,443,587,873,2086,2087,2089,2703

UDP_IN =
20,21,53

UDP_OUT =
20,21,53,113,123,873,6277

If you have changed your SSH port number, you need to add this new port on the “IPv4 Port Settings” and/or “IPv6 Port Settings”.

You can also use this section to add a specific port for an new application installed on the server.

If you are using R1soft/Idera external backup solution, you need to allow inbound traffic for TCP port 1167 in the port TCP_IN section.

# Enable syslog monitoring #

Set “SYSLOG_CHECK” to “1800”

# Detect suspicious process #

Set “PT_DELETED” to “1”

Set “PT_ALL_USERS” to “1”

# Spam Protection and massive email activity detection (optional) – SMTP Settings#

CSF can help you to secure spam abuse vector and detect suspicious email activities.

Set “SMTP_BLOCK” to “1” in “SMTP Settings” section.

Set “LF_SCRIPT_LIMIT” to “250” to identify scripts sending out 250 emails messages in an hour.

Set “LF_SCRIPT_ALERT” to “1” to send an email alert to the system administrator when the limit configured above is reached.

# Save the configuration and confirm the firewall status #

You can save the configuration by clicking the “Change” button at the end of the page. Then restart csf/lfd service.

Thereafter, go back in the ConfigServer Security Firewall main page.

On the top of this page, you should see “Firewall Status: Enabled but in Test Mode”

If you see “Firewall Status: Disabled and Stopped” please click on “Enable”.

3. Confirm the configuration and remove the “Testing mode”.

Once you are satisfied with the configuration and confirmed that it is working fine, you need to remove the “Testing mode”.

Go back in the “Firewall Configuration (“csf – ConfigServer Firewall” section)

Set “TESTING” to 0

Save this modification by clicking the “Change” button at the end of the page and restart csf/lfd service.

4. Monitor the firewall activity

You can monitor the firewall activity by clicking the “Watch system Logs” button on the ConfigServer Security Firewall main page.

Or read the log file /var/log/lfd.log which is accessible via SSH.


Reference: http://www.configserver.com/cp/csf.html

continue reading
Ashik Daily NeedWHM

Changing the SSH port number

December 4, 2026 November 10, 2020 coderstent

To change the port for the SSH server, follow these steps: Log in to the server as root using SSH.

continue reading
Email SettingsEmail Spam ControlEximWHM

Domain has outgoing email disabled

December 4, 2026 January 29, 2021 coderstent

You can fix this through this command. Code: whmapi1 unsuspend_outgoing_email user=$USER Ex : whmapi1 unsuspend_outgoing_email user=test Here test is your

continue reading
Ashik Daily NeedLinux General Knowledge

How To Find and Edit php.ini File Using SSH

December 4, 2026 November 5, 2020 coderstent

This is very simple way to find php.ini file to make changes. You need to have access to these files, and

continue reading
GeneralUbuntu VPS

Install GoDaddy SSL Certificate on Ubuntu 16.04

December 4, 2026 August 10, 2019 coderstent

Elements Basically in order to successfully install an SSL certificate you need the following things CSR file Private key Certificate

continue reading
WHM SSH

How to activate and using plugins with webmail in WHM

December 4, 2026 May 12, 2022 coderstent

In order to enable/disable any of these plugins, you need to add/remove each plugin's name to/from Roundcube's configuration file. Here

continue reading
General

Missing DEFMOD Config Line in /etc/wwwacct.conf

December 4, 2026 April 15, 2020 coderstent

1. Login as root 2. Type "pico /etc/wwwact.conf" 3. Add the following line "DEFMOD Xskin" (replace Xskin with the default

continue reading
GeneralWHM Security

Error: “WARNING: RESTRICT_SYSLOG is disabled. See SECURITY WARNING in Firewall Configuration”

December 4, 2026 April 24, 2022 coderstent

If you are getting error “WARNING: RESTRICT_SYSLOG is disabled. See SECURITY WARNING in Firewall Configuration” after clicking on “configServer security

continue reading
All About SSLWHM

Install Let’s Encrypt SSL on Hostname in cPanel/WHM Server

December 4, 2026 August 12, 2019 coderstent

The Let’s Encrypt allows you to install AutoSSL for the hostname. In this tutorial, I will show you how to

continue reading
CloudflareMail

How to genearte a secure mail server addesses with SSL /TLS in cPanel and Cloudflare

December 4, 2026 March 31, 2021 coderstent

1) Add cpcalendar, cpcontacts, mail and webmail A records pointing to your sever's IP. make sure the Procy Status (Cloud)

continue reading
1 2 3 4
Page 1 of 4

CLICK ON PROFILE

Hire Syed Ashik Mahmud on Fiverr

CLICK ON PROFILE

Hire Syed Ashik Mahmud on Fiverr

Categories

  • All About SSL2
  • Ashik Daily Need8
  • Cloudflare2
  • Cloudflare Support1
  • cPanel1
  • CSF1
  • CXS1
  • Email Settings2
  • Email Spam Control2
  • Exim2
  • General10
  • Linux General Knowledge2
  • Linux Log Monitoring1
  • Mail2
  • Shell Scripting1
  • SSH3
  • Ubuntu VPS1
  • VPS Security4
  • WHM11
  • WHM ISSUE FIX2
  • WHM Security2
  • WHM SSH3

Tags

cloudflare cpanel csf email Exim GoDaddy hacked linux Log Mail malware mysql security Server Down spam SSL Ubuntu vps whm