BuycPanel Blog

BuycPanel Blog

Latest news and updates

8/10/2015 – Understanding the Security Level of your Server

Posted by Jamison on 10 08 2015.

There is no explicit statement which will tell you the security level of your server.  However, there are ways to determine how secure your server is.

 

Is your server running on secure ports?

 

cPanel and WHM operate on ports, several of which interact with outside connection to be able to function accordingly.  However, make sure that these unsecured ports are managed properly as they are prone to malicious hacks that can degrade your system performance, or worse, take control of your admin and users’ directories.

 

The following are the unsecured ports of your cPanel and WHM:

 

	2082 (cPanel)
	2086 (WHM)
	2095 (Webmail)

 

To disable connection to these ports, simply follow the steps below:

 

STEP 1: Log into your WHM.

STEP 2: Go to “Server Configuration.”

STEP 3: Click “Tweak Settings.”

STEP 4: Select the following option by clicking ON: “Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc.”

 

Firewall: Your basic defense

 

Installing a firewall is one of your basic…

There is no explicit statement which will tell you the security level of your server.  However, there are ways to determine how secure your server is.

 

Is your server running on secure ports?

 

cPanel and WHM operate on ports, several of which interact with outside connection to be able to function accordingly.  However, make sure that these unsecured ports are managed properly as they are prone to malicious hacks that can degrade your system performance, or worse, take control of your admin and users’ directories.

 

The following are the unsecured ports of your cPanel and WHM:

 

  • 2082 (cPanel)
  • 2086 (WHM)
  • 2095 (Webmail)

 

To disable connection to these ports, simply follow the steps below:

 

STEP 1: Log into your WHM.

STEP 2: Go to “Server Configuration.”

STEP 3: Click “Tweak Settings.”

STEP 4: Select the following option by clicking ON: “Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc.”

 

Firewall: Your basic defense

 

Installing a firewall is one of your basic defenses in safeguarding your server.  Having none makes your server vulnerable and prone to instantaneous attacks.  cPanel and WHM use Config Server Firewall (CSF) as plug in to address security issues.  It can be easily installed and tuned even by non-professionals.

 

To install CSF, run the following script: sh /csf/install.sh

 

To determine if the CSF is successfully running, follow the steps below:

STEP 1: Log in to your cPanel WHM.

STEP 2: Go to Plugins.

STEP 3: Navigate to “Config Security & Firewall.”

STEP 4 “Firewall Status” should display Running.

 

You can perform a basic server security after successfully enabling CSF.

 

To uninstall the CSF, just run the following script:

Directory: /etc/csf

sh /etc/csf/uninstall.sh

We advise against removing the CSF as it will pose security issues to your server.

 

Secure your Apache

 

Your web server applications are among your most exposed applications in the internet.  As such, it is important also to boost the security of your Apache installation.  Mod_Security is another tool used by cPanel and WHM to harden the security level of your server.  It is not a firewall but it filters questionable coded applications from gaining access to your system.  It is a good firewall to protect your Apache web applications from malicious attacks.

 

If you are running on a 11.40 or later version of cPanel and WHM, the EasyApache (Apache Update) interface already includes the mod_security module by default.  For other users running on older versions, you can install mod_security by following the steps below as listed by cPanel Documentation FAQ:

 

STEP 1: Log in to your WHM.

STEP 2: Go to “Software” Section and run EasyApache.

STEP 3: Select the profile you wish to modify.

STEP 4: Click the “Unknown Attachment” corresponding to your selection.

STEP 5: Click “Next Step” in the Apache Version interface.

STEP 6: Click “Next Step” in the PHP Version interface.

STEP 7: On the Short Options List interface, install the “mod_security” Apache module and select the “Mod Security” option.

STEP 8: Click “Save and Build.”

 

Lastly, check periodically if your server is running the latest cPanel and WHM.  For this, visit http://httpupdate.cpanel.net.  You can also set your system software to automatically update in WHM’s Update Preferences.