Talking about Secure Servers With CSF Config Server Firewall, Not unlike the place we live in the real world, the existence of a server is also often the target of bad people who generally want to disrupt the stability and safety. Departing from this, then comes an application called a firewall to secure a server from external attacks. There are some names firewall applications are known, one of which is CSF (ConfigServer Security & Firewall). As the name implies, this application is in charge of securing the existence of a system from the types of attacks that can destabilize the server. One of the advantages CSF from similar applications is ease of installation and configuration. Therefore, in this article I will present a guide to integrate the CSF as a firewall on your server or VPS account.
Perl Module Integration
CSF requires library of Perl modules, so be sure to integrate into your system first.
If your operating system is CentOS, execute the following commands through the console to know the perl installation packages are available.
[[email protected] ]# yum list available | grep perl
After that continue with the integration of the Perl modules required. Still through the console, execute the command below to do so and wait until the installation process is complete.
[[email protected] ]# yum -y install mod_perl.i386 mod_perl-devel.i386 perl-libwww-perl.noarch
After a Perl module available in the system, now you can proceed to the installation phase CSF. Check out a few steps below.
Go to your working directory, then download the installer package it CSF.
[[email protected]]# cd /root [[email protected]]# wget -c http://configserver.com/free/csf.tgz
Unloading a file compression CSF and into the extraction directory.
[[email protected]]# tar xzf csf.tgz [[email protected]]# cd csf
Integrate CSF into the system, then test the results of the installation.
[[email protected]]# sh install.sh [[email protected]]#csf -r
Done with the installation stage and the CSF has been running in test mode (Testing). For that, the next step is to configure the CSF.
Use any text editor available on the system, then edit the configuration files CSF.
[[email protected]]# vi /etc/CSF/csf.conf
Make sure the testing option is turned off by giving the value 0.
TESTING = "0"
For CSF automatically update the latest release version if there is, switch it auto updates.
AUTO_UPDATES = "1"
For passive FTP session handling, also define the port ranges are allowed in the TCP_IN.
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,30000:35000"
CSF is also equipped with LFD (Login Failure Detection), which served to detect and block the process of login error that exceeds the requirement.
LF_SSHD = "5" # A maximum of 5 times the error log in via SSH LF_FTPD = "10" # A maximum of 10 times via FTP login errors LF_SMTPAUTH = "5" # A maximum of 5 times the error log via SMTP LF_POP3D = "10" # A maximum of 10 times via POP3 login error LF_IMAPD = "10" # A maximum of 10 times the error log in via IMAP or webmail LF_HTACCESS = "5" # A maximum of 5 times the error login on the website
Some other options you can switch on and set the configuration as needed. Be sure to save the configuration upon completion.
Apply the latest configuration of the system by repeating the daemon CSF.
[[email protected]] # CSF-r
Operate CSF in Console
Latest configuration has been implemented and now your system is protected by CSF which acts as a firewall. In addition to configuration, you can also execute some commands congenital CSF. For example, you get an IP address that disrupt the system for activities PING constantly keep your system becomes busy (POD – Ping of Death).
For example the handling of the case above, you can just reconfigure in the CSF for ignore ICMP protocol request. But if you just want to deny ICMP request from a certain IP address only, then you can also define it using the internal command CSF.
[[email protected]] # CSF-d 123 123 123 123 [[email protected]] # CSF-r
With a simple command above, the system will reject all request from IP address 123 123 123 123. It is marked with the-d parameter which stands for Deny (Reject). Be sure to repeat the daemon CSF CSF-r command every time you make changes.
Note: To find out the internal commands CSF and its function, please CSF followed by execution command button presses [enter] on the keyboard.
Integrate CSF in cPanel
It can be used in environments CLI (Command Line Interface), CSF can also collaborate with cPanel. CSF will be recognized as one of the intake (Plugins) WHM after finish integrated into the system. That way, you also can configure via a browser.
Use any browser to visit the WHM, and then do the validation account.
Arriving at the WHM main menu, scroll down and click on the option [Plugins] for all existing intake WHM displayed.
Click the option [ConfigServer Security & Firewall] and not long ago all the features associated with the CSF is presented.
Similar to the CLI mode, you can also configure the CSF through the [Firewall Configuration]. Also try measuring your system’s security level using the [Check Server Security] which will calculate the level of server security and view reports with the score. Through the report also can you see anywhere that still must be addressed for the server more secure.
After knowing and learn article above, would now not have to worry anymore to integrate CSF to VPS or server system. With a variety of features that are reliable, simple configuration, easy operation, compatible with cPanel and free licensed. Why wait? Immediately reinforce your system using CSF now. Next you can simply sit back and allow the CSF on guard.