Securing a web server is the most vital and important part of it is facing flood attacks. If the server is available over the Internet without any protection, then a regular flood of random and targeted attacks is going to happen.
That is the reason the installation of a firewall and a brute force attack detection tool should consider at the very initial stage. In the present situation, we recommended CSF and LFD secure the web server. Both tools have kept up with the pace and are very much updated. And best of all this solution is freely available.
If you are using cPanel and WHM servers, then it is very easy to install and configure CSF and LFD. The following steps will help you in the installation process.
1. Log into your web server and switch to the root user.
2. Switch directories to your download directory.
3. Download the current version from configserver.com
4. Untar the package: # tar -xzf csf.tgz
5. Switch into the newly extracted folder: # cd csf
6. Now run the installer: #sh install.sh
7. And if APF and BFD are running on your server, then it is necessary to disable those applications: # sh disable_apf_bfd.sh
If you are using WHM to manage server activities, then it is very easy to configure CSF and LFD from the WHM panel. Nowadays CSF and LFD pre-configured with cPanel/WHM server so there is not that much to do after the installation.
You just need to Log in to WHM and inspect the new configuration service. For instance, you can uninstall APF/BFD from WHM with the click of a button. Anyway, if you want to edit the CSF and LFD configuration manually, then you can do so at /etc/csf/*.
However, make sure to take backups before you make any changes. To avoid being locked out you should use debug mode as well.
If you want to uninstall CSF/LFD, then Log in to your server via SSH and switch to the root user.
a. Switch to the folder holding the uninstaller: # cd /etc/csf
b. Run the uninstaller: # sh uninstall.sh
It is highly recommended that you read the readme.txt file, which comes with CSF/LFD. This is helpful for you to make yourself familiar with this product. The readme.txt file will show you the working process of both applications. Although the readme.txt file shows what we need to configure to make our server properly configured