{"id":895,"date":"2017-10-10T10:29:33","date_gmt":"2017-10-10T10:29:33","guid":{"rendered":"https:\/\/www.newdelhihosting.co.in\/blog\/?p=895"},"modified":"2017-10-23T12:08:04","modified_gmt":"2017-10-23T12:08:04","slug":"tips-for-securing-your-cpanel-server","status":"publish","type":"post","link":"https:\/\/www.newdelhihosting.co.in\/blog\/tips-for-securing-your-cpanel-server\/","title":{"rendered":"Tips for securing your cPanel server"},"content":{"rendered":"<h4>Use Secure Passwords<\/h4>\n<p>Insecure passwords are one common security vulnerability. If an account password is insecure and compromised client sites can be defaced, hacked and valuable data can be stolen.<\/p>\n<p>Always change your password as often as possible. Here are more tips to making a secure password.<\/p>\n<ul>\n<li>Passwords should be alphanumeric and grammatical.<\/li>\n<li>Passwords should be in 10 or more characters.<\/li>\n<li>Don\u2019t use the same password for other sites.<\/li>\n<li>Don\u2019t let your browser store your passwords.<\/li>\n<li>Don\u2019t use names of your family, birthdate or numbers special to you.<\/li>\n<li>Don\u2019t use any dictionary words in your password.<\/li>\n<li>Generate a random password, some password generator sites. They\u00a0provide options to generate password with special characters.<\/li>\n<\/ul>\n<h4>Use secure SSH Keys<\/h4>\n<p>Change the way of login to your servers shell from passwords to SSH keys. SSH keys are more secure and require a special pass phrase to be used. To generate an SSH key login to\u00a0<strong>WHM<\/strong>\u00a0&gt;\u00a0<strong>Security Center<\/strong>Section &gt;\u00a0<strong>Manage root\u2019s SSH Keys<\/strong>.<\/p>\n<p>Click on\u00a0<strong>Generate a New Key<\/strong>, enter the key name and your secure password twice.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-896\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/sshkey1.jpg\" alt=\"\" width=\"803\" height=\"518\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/sshkey1.jpg 803w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/sshkey1-300x194.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/sshkey1-768x495.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/sshkey1-250x161.jpg 250w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Move SSH to a Different Port<\/h4>\n<p>Try to move your ssh to a different port to deter anyone without any specific knowledge of your server from easily discovering your ssh port. Most visitors search on port 22 which is the default ssh port.<\/p>\n<p>Always use custom port since these are privilege ports and only root can use them.<\/p>\n<p>&nbsp;<\/p>\n<h4>Enable CPHulk Brute Force Protection<\/h4>\n<p>CPHUlk \u00a0a service that protects your server from brute force attacks. A brute force attack is a hacking method that uses an automated system to guess the password to your web server or services.<\/p>\n<p>When CPHulk blocks an attack it shows in the login page that the \u2018<strong>login is invalid<\/strong>\u2018. To avoid getting locked out of your own server, add your ip address to the whitelist.<\/p>\n<p>You can access CPHulk thru\u00a0<strong>WHM<\/strong>\u00a0&gt;\u00a0<strong>Security Center<\/strong>\u00a0section &gt;\u00a0<strong>cPHulk Brute Force Protection<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-897\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut-1024x561.jpg\" alt=\"\" width=\"780\" height=\"427\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut-1024x561.jpg 1024w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut-300x164.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut-768x421.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut-250x137.jpg 250w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/brut.jpg 1183w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Turn off unused services and daemons<\/h4>\n<p>Any service or daemon that allows connections to your server may also allow hackers to gain access. To reduce security risks, disable all services and daemons that you do not use.<\/p>\n<p>Disable any services that are not in use in WHM\u2019s Service Manager interface<\/p>\n<p>(<strong>Home<\/strong>\u00a0&gt;&gt;\u00a0<strong>Service Configuration<\/strong>\u00a0&gt;&gt;\u00a0<strong>Service Manager<\/strong>).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-898\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service-1024x529.jpg\" alt=\"\" width=\"780\" height=\"403\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service-1024x529.jpg 1024w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service-300x155.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service-768x396.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service-250x129.jpg 250w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/service.jpg 1302w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Secure your Apache<\/h4>\n<p>The most readily-available way to access a web server is the web server application. You must secure your Apache installation.<\/p>\n<p>One of the best tools that you can use to prevent malicious Apache use is ModSecurity\u2122.<\/p>\n<p>In cPanel &amp; WHM version 64.0 and later, you can use the following interfaces to manage ModSecurity:<\/p>\n<ul>\n<li>WHM\u2019s ModSecurity\u2122 Tools interface (<strong>Home<\/strong>\u00a0&gt;&gt;\u00a0<strong>Security Center<\/strong>\u00a0&gt;&gt;\u00a0<strong>ModSecurity\u2122 Tools<\/strong>).<\/li>\n<li>WHM\u2019s ModSecurity\u2122 Configuration interface (<strong>Home<\/strong>\u00a0&gt;&gt;\u00a0<strong>Security Center<\/strong>\u00a0&gt;&gt;\u00a0<strong>ModSecurity\u2122 Configuration<\/strong>).<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-899\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod-1024x660.jpg\" alt=\"\" width=\"780\" height=\"503\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod-1024x660.jpg 1024w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod-300x193.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod-768x495.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod-250x161.jpg 250w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/mod.jpg 1053w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Install CSF<\/h4>\n<p>If your PC is connected to the Internet, you are a potential target to an array of cyber threats, such as hackers, keyloggers, and Trojans that attack through unpatched security holes. This means that if you, like most people shop and bank online, are vulnerable to identity theft and other malicious attacks.<\/p>\n<p>A firewall works as a shield, between your PC and cyber space. When you are connected to the Internet, you are constantly sending and receiving information in small units called packets. The firewall filters these packets to see if they meet certain criteria set by a series of rules, and thereafter blocks or allows the data. This way, hackers cannot get inside and steal information such as bank account numbers and passwords from you.<\/p>\n<p>Once such firewall you can install for WHM\/cPanel is\u00a0<strong>CSF (ConfigServe Firewall)<\/strong>. CSF configures your server\u2019s firewall to lock down public access to services and only allow certain connections, such as logging in to FTP, checking your email, or loading your websites. ConfigServe Firewall also comes with a service called Login Failure Daemon, or LFD.<\/p>\n<p>Now,\u00a0Login to your WHM and you will now see a CSF configuration page in the\u00a0<strong>Plugins<\/strong>\u00a0section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-900\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2-1024x522.jpg\" alt=\"\" width=\"780\" height=\"398\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2-1024x522.jpg 1024w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2-300x153.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2-768x391.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2-250x127.jpg 250w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/csf-2.jpg 1281w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Harden your \/tmp partition<\/h4>\n<p>We recommend that you use a separate\u00a0<em>\/tmp<\/em>\u00a0partition that you mount with the nosuid option. This option forces a process to run with the privileges of its executor. You may also wish to mount the\u00a0<em>\/tmp<\/em>directory with noexec after you install cPanel &amp; WHM.<\/p>\n<p>To mount your\u00a0<em>\/tmp<\/em>\u00a0partition to a temporary file for extra security you will have to run:<\/p>\n<p>&nbsp;<\/p>\n<pre># \/scripts\/securetmp<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Note:<\/strong>\u00a0make sure that disk space is enough for the partitions. 8GB minimumfor\u00a0<em>\/usr<\/em>\u00a0and 16GB for\u00a0<em>\/var<\/em>\u00a0is recommended.<\/p>\n<p>&nbsp;<\/p>\n<h4>Disable system compilers<\/h4>\n<p>Most users do not require the use of C and C++ compilers. We strongly recommend that you disable compilers for all users who are not in the compilers group in the\u00a0<em>\/etc\/group<\/em>\u00a0file. Many pre-packaged exploits require functional compilers.<\/p>\n<p>To disable compilers from the WHM interface, use WHM\u2019s Compiler Access interface<\/p>\n<p><strong>(Home &gt;&gt; Security Center &gt;&gt; Compiler Access).<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-903\" src=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile-1024x349.jpg\" alt=\"\" width=\"780\" height=\"266\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile-1024x349.jpg 1024w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile-300x102.jpg 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile-768x262.jpg 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile-250x85.jpg 250w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/compile.jpg 1306w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can also disable compilers from the command line, run the following command as the root user<\/p>\n<p>&nbsp;<\/p>\n<pre># \/scripts\/compilers off<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Use Secure Passwords Insecure passwords are one common security vulnerability. If an account password is insecure and compromised client sites can be defaced, hacked and valuable data can be stolen. Always change your password as often as possible. Here are more tips to making a secure password. Passwords should be alphanumeric and grammatical. Passwords should&#8230;<\/p>\n","protected":false},"author":1,"featured_media":905,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-895","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general"],"jetpack_featured_media_url":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/10\/securecPanel.jpg","_links":{"self":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/895"}],"collection":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":3,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"predecessor-version":[{"id":904,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions\/904"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media\/905"}],"wp:attachment":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}