Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How we configure CSF firewall in Webmin and fix related errors

by | Aug 9, 2019

Protecting the server from malicious attack at any cost is one of the primary needs of server owners.

CSF offers an effective way to prevent unauthorized server access and it detects intrusion easily.

Luckily, control panels like Webmin offer a user-friendly interface to set up a CSF firewall. But, to make it work, we need to configure CSF.

At Bobcares, we often get requests from our customers to install and configure the CSF firewall in Webmin as part of our Server Management Services.

Today, we’ll see how our Support Engineers set up CSF in Webmin and fix related errors.

 

How we install CSF firewall on Centos7 Webmin server

Before proceeding further, let’s have a quick look at CSF.

CSF is a firewall configuration script used to protect the server from malicious attack and provide better server security. Also, it helps to prevent public access to services and only allow certain connections to the server.

While installing the CSF, it helps to control inbound and outbound traffic from existing connections. Therefore, it is worth to install CSF on the server to enhance server security.

Here, let’s see how our Support Engineers install the CSF firewall on Centos7 Webmin server.

 

1. Initially, we SSH into the server as a root user.

2.  We download and unpack the CSF package by using the following commands.

wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz

3, Next, we switch to the CSF directory and run the install script too.

cd csf
sh install.sh

4.  Then, we ensure that the server has required iptables modules with the following command.

perl /etc/csf/csftest.pl

5. Next, we login into the Webmin control panel and go to Webmin > Webmin Configuration > Webmin Modules.

6. We select From local file filed and paste /etc/csf/csfwebmin.tgz in the same field.

7. Finally, we click on the Install Module button. And, restart the csf service.

That’s it. Now the CSF module in Webmin is ready to use.

 

How we fixed CSF install errors in Webmin

From our experience in managing servers, we’ve seen customers facing problems while installing and configuring CSF in Webmin.

Now let’s see how our Support Engineers fix the top errors.

 

1. Bad Firewall configuration

Recently, one of our customers contacted us with a problem related to CSF firewall installation. After installing CSF on the Webmin server, he was getting an error while restating CSF. The error said,

csf: FASTSTART loading Packet Filter (IPv4)
Error: FASTTART: (Packet Filter IPv4) [] [iptables-restore: line 14 failed]. Try restarting csf with FASTSTART disabled, at line 4285

On checking, our Support Engineers found that the problem was due to bad settings in the firewall configuration.

Therefore, we solved the problem by tweaking the settings in the file csf.conf.

We edited the csf config fileat /etc/csf/csf.conf and disabled FASTSTART by changing FASTSTART = “1” to
FASTSTART = “0”.

This fixed the problem and CSF started working fine.

 

2. Missing Perl modules

Many customers may have problems because of missing Perl modules too. In order to run CSF properly, we need to install dependency Perl modules as well.

However, it is very easy to install the Perl modules on the server. Now, let’s see how our Support Engineers solved the error.

Here, one of our customers had an error while restarting the CSF service. He got an error,

*WARNING* URLGET set to use LWP but perl module is not installed, reverting to HTTP::Tiny

So, we fixed the error by simply installing the Perl modules with the following command.

yum install perl-libwww-perl

Also, we restarted the CSF  too.

csf -r

That solved the problem with firewall.

[Having difficulty in installing CSF firewall in Webmin? We’ll fix it for you.] 

 

Conclusion

In short, CSF is a firewall that helps to protect the server from malicious attacks. Today, we saw how our Support Engineers set up the CSF firewall in Webmin and fix related errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF