How to install CSF on Linux
In this tutorial you will learn how to install and configure CSF on Linux Dedicated server.
At present before installing CSF make sure you need to install the following Perl modules.
The given modules are needed for detail graphs open from the CSF UI. we require Perl modules which can assist CSF with running its modules in the backend.
$ sudo apt-get install liblist-compare-perl
Install CSF is immediate and quiet to get to it.
First of all download most recent source file of CSF firewall utilizing beneath command to download,
$ sudo wget https://download.configserver.com/csf.tgz
Now extract downloaded file and in the event that you need you can remove that after extraction.
$ sudo tar -xvzf csf.tgz && rm csf.tgz
Go into the CSF file to install,
$ cd csf/
Run "Install.sh" script to install CSF file,
$ sudo ./install.sh
Presently, we should confirm that in the event that you have fundamental iptables modules by utilizing underneath command on your Linux Dedicated server,
$ sudo perl /usr/local/csf/bin/csftest.pl
You can view something almost similar to.
RESULT: CSF should function on this web server
You need to remove the already firewalls from the server of your Linux Dedicated hosting if such exist, else it will hurt CSF surely.
$ sudo bash /usr/local/csf/bin/remove_apf_bfd.sh
One of the undertaking to check and remove of the firewall is done likewise bear in mind about that sneaky UFW Firewall.
$ sudo ufw disable
Firewall stopped and disabled on system startup
Go into default directory of csf file, Modify to csf config file.
$ cd /etc/csf/
Presently inside this directory, All arrangement of CSF are here and take a look at these records later we're experiencing a portion of the configuration documents to realize what we can do.
alerts csf.deny csf.logfiles
csf.rblconf csf.sips csftest.pl
changelog.txt csf.dirwatch csf.logignore
csf.redirect csf.smtpauth csf.uidignore
csf.allow csf.dyndns csf.mignore
csf.resellers csf.suignore csfwebmin.tgz
csf.blocklists csf.fignore csf.pignore
csf.rignore csf.syslogs install.txt
csf.conf csf.ignore csf.pl
csf.signore csf.syslogusers lfd.pl
Below are the CSF firewall commands for the installation procedure.
Alter the configuration file to roll out improvements keeping in mind the end goal to work CSF,
$ sudo nano csf.conf
Under this setup, Scroll down and search and roll out improvements to,
**Testing="1"** to **Testing="0"**
Save and then close it, It will enable CSF for utilize.
In case everything goes as in the guide, We would now be able to start CSF and LFD administrations.
$ sudo service csf start
$ sudo service lfd start
Yield should resemble this at the base,
LOCALINPUT all opt -- in !lo out * 0.0.0.0/0 ->
LOCALOUTPUT all opt in * out !lo ::/0 -> ::/0
LOCALINPUT all opt in !lo out * ::/0 -> ::/0
We are going to examine CSF design files and it’s uses
At beginning of CSF, If you get this following mistake demonstrated as follows,
*WARNING* URLGET set to use LWP but Perl module is not installed, reverting to HTTP:: Tiny
Use the command given below to install perl dependencies so CSF will work properly.
$ sudo apt-get install libwww-perl
All done, now CSF is installed on your Linux Dedicated server.