{"id":2763,"date":"2020-02-20T00:47:25","date_gmt":"2020-02-19T19:17:25","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2763"},"modified":"2020-02-20T10:22:09","modified_gmt":"2020-02-20T04:52:09","slug":"how-to-configure-your-server-correctly-in-2020","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/","title":{"rendered":"How To Configure Your Server Correctly in 2020"},"content":{"rendered":"\n<p>If you plan to take a&nbsp;&nbsp;LAMP server&nbsp;&nbsp;(Linux, Apache, MySQL and PHP), whether it is a virtual private server (VPS) or a dedicated server, the first thing to do is to secure it. <\/p>\n\n\n\n<p>This guide outlines the procedure to follow to correctly configure your server.&nbsp;I&#8217;ll go over the basics and know some great tools you can use. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 1: Configuring the firewall<\/strong><\/h2>\n\n\n\n<p>The first thing to do to secure your server is to set up a firewall.&nbsp;A firewall acts as a barrier between your server and the outside world;&nbsp;it checks that everything that enters is secure and blocks any malicious traffic.&nbsp;There is a huge choice of firewall solutions, but we will focus on the two best known:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">UFW<\/h3>\n\n\n\n<p>Simple firewall,&nbsp;&nbsp;UFW&nbsp;&nbsp;is a good solution that requires only minimal configuration.&nbsp;The solution provides an intuitive way to create custom firewall rules and works with IPv4 and IPv6 networks.&nbsp;The UFW firewall is deactivated by default, do not forget to activate it to configure it.&nbsp;The UFW firewall also has a user interface accessible under the name&nbsp;&nbsp;Gufw&nbsp;. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">iptables<\/h3>\n\n\n\n<p>Iptables is a known firewall provided with the Linux kernel;&nbsp;it is enabled by default in Linux.&nbsp;Like UFW, it works with both IPv4 and IPv6 networks.&nbsp;There is another version of iptables called ip6tables to manage IPv6. <br>Unlike UFW, the iptables syntax is quite difficult to master.&nbsp;Its advantage: it makes it possible to create security configurations of greater granularity.&nbsp;It is therefore a powerful tool to secure your server. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Securing the configuration of the remote connection<\/strong><\/h2>\n\n\n\n<p>As a server administrator, you will often need to connect to\nyour server over the Internet.&nbsp;This remote connection must therefore be\nsecure and encrypted.&nbsp;To do this, you must set up a secure SSH connection\nto your server.<\/p>\n\n\n\n<p>There are two methods to connect in SSH:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Password login <\/h3>\n\n\n\n<p>As the name suggests, this type of connection requires entering a password each time you want to connect using SSH.&nbsp;Although this method requires less configuration, it is less secure and more exposed to brute force attacks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Connection with certificate<\/h3>\n\n\n\n<p>For this type of connection, the server and the client machine must exchange their public key used to encrypt the connection.&nbsp;They must also authenticate each other.&nbsp;More complex to configure than the password method, this type of connection has the advantage of being much safer to connect to your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 3: Install a malware analysis tool<\/strong><\/h2>\n\n\n\n<p>Using a malware analysis tool to monitor your server helps detect malware intrusions.&nbsp;Below are the two best-known free rootkit detection tools for malware analysis on your server:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">chkrootkit<\/h3>\n\n\n\n<p>This famous scanner for hiding activity tools &#8211; or rootkits &#8211; searches for suspicious rootkit processes on a Linux server.&nbsp;Even if&nbsp;&nbsp;chkrootkit&nbsp;&nbsp;cannot detect all possible types of malware, it is undeniably a good place to start.&nbsp;However, don&#8217;t rely solely on chkrootkit to perform a comprehensive malware scan on your server;&nbsp;it is above all an entry level solution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">rkhunter<\/h3>\n\n\n\n<p>Like chkrootkit,&nbsp;&nbsp;Rkhunter&nbsp;&nbsp;searches for hidden rootkits on the system.&nbsp;It is also able to identify hidden files, bad permissions and suspicious strings.&nbsp;It can run on any Unix-based system.&nbsp;For correct detection of the most common malware, you can combine rkhunter with chkrootkit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step&nbsp;4: Configure intrusion detection<\/strong><\/h2>\n\n\n\n<p>Take intrusion detection as an alarm system capable of detecting unauthorized access to your server.&nbsp;Two of the best known intrusion detection systems are listed below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Help<\/h3>\n\n\n\n<p>Help&nbsp;&nbsp;is a free directory and file integrity\nverification system that works like a trap.&nbsp;First, it creates a database\nof the current state of the system.&nbsp;It then checks the integrity of any\nfile present in the system by comparing it with the known database.&nbsp;The\nserver administrator is then notified in the event of significant changes that\ncould jeopardize the integrity of the system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Bro<\/h3>\n\n\n\n<p>Bro&nbsp;&nbsp;is a network intrusion detection system that monitors for unusual activity on your network.&nbsp;Bro works in the following way: he initially creates rules based on events generated on the network, the state of the network or the rules in place.&nbsp;If it detects something unusual, it creates an alert, modifies the firewall rules, updates the incident logs.&nbsp;The downside of this extremely versatile tool is its learning curve which can put off beginners.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 5: Replace FTP SFTP<\/strong><\/h2>\n\n\n\n<p>As an administrator, you are going to need to upload files\nto or from your server from time to time.&nbsp;The most well-known file\ntransfer protocol (FTP) is subject to security vulnerabilities, the\nauthentication of the connection being carried out in plain text &#8211; format\nliable to be intercepted.&nbsp;By opting for the secure&nbsp;SFTP&nbsp;file\ntransfer protocol&nbsp;&nbsp;, you choose a more secure solution, easy to\ninstall and configure on your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 6:&nbsp;Perform updates and regularly apply the patches to your server<\/strong><\/h2>\n\n\n\n<p>If your server is based on Linux or UNIX, do not forget to update and upgrade your kernel, because distributors regularly update their kernel.&nbsp;Updating the kernel helps stabilize your system by taking advantage of the latest security patches and possible new kernel features.&nbsp;Not applying patches on a server is like inviting hackers to enter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 7: Set permissions correctly<\/strong><\/h2>\n\n\n\n<p>Permissions on the server are crucial.&nbsp;Any\nconfiguration error in the authorization settings can allow an attacker to\neasily take control of your server.&nbsp;When configuring permissions for users\non your systems, limit yourself only to the permissions they will need.<\/p>\n\n\n\n<p>By default, you can apply\nthe&nbsp;umask&nbsp;&nbsp;rules&nbsp;&nbsp;for any new file created on a Linux\nserver.&nbsp;This will allow you to limit the permissions associated with the\nfiles.&nbsp;The use of&nbsp;SGID&nbsp;(&nbsp;<em>Set Group Identification<\/em>&nbsp;)\nand&nbsp;SUID&nbsp;(&nbsp;<em>Set User Identification<\/em>&nbsp;) in files and\ndirectories makes it possible to restrict the permissions of certain users and\ngroups for sensitive directories and files.&nbsp;This will not restrict the\npossibilities for them to use the server functionalities that they are\nauthorized to use (such as the function of recovering a forgotten password).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Server security is crucial<\/strong><\/h2>\n\n\n\n<p>The points we have raised here are just general advice to\nhelp you keep your server to a minimum.&nbsp;Security is of course a broad\nsubject that must be kept in mind at all times to remain vigilant.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you plan to take a&nbsp;&nbsp;LAMP server&nbsp;&nbsp;(Linux, Apache, MySQL and PHP), whether it is a virtual private server (VPS) or a dedicated server, the first thing to do is to secure it. This guide outlines the procedure to follow to correctly configure your server.&nbsp;I&#8217;ll go over the basics and know some great tools you can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":175,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[39],"tags":[202,207],"class_list":["post-2763","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server-management","tag-configure-server","tag-serversupport"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"If you plan to take a&nbsp;&nbsp;LAMP server&nbsp;&nbsp;(Linux, Apache, MySQL and PHP), whether it is a virtual private server (VPS) or a dedicated server, the first thing to do is to secure it. This guide outlines the procedure to follow to correctly configure your server.&nbsp;I&#8217;ll go over the basics and know some great tools you can [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-19T19:17:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-20T04:52:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"903\" \/>\n\t<meta property=\"og:image:height\" content=\"248\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/\",\"name\":\"How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1\",\"datePublished\":\"2020-02-19T19:17:25+00:00\",\"dateModified\":\"2020-02-20T04:52:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1\",\"width\":903,\"height\":248,\"caption\":\"server-management\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Configure Your Server Correctly in 2020\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/","og_locale":"en_US","og_type":"article","og_title":"How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog","og_description":"If you plan to take a&nbsp;&nbsp;LAMP server&nbsp;&nbsp;(Linux, Apache, MySQL and PHP), whether it is a virtual private server (VPS) or a dedicated server, the first thing to do is to secure it. This guide outlines the procedure to follow to correctly configure your server.&nbsp;I&#8217;ll go over the basics and know some great tools you can [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-02-19T19:17:25+00:00","article_modified_time":"2020-02-20T04:52:09+00:00","og_image":[{"width":903,"height":248,"url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1","type":"image\/jpeg"}],"author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/","name":"How To Configure Your Server Correctly in 2020 | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage"},"image":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1","datePublished":"2020-02-19T19:17:25+00:00","dateModified":"2020-02-20T04:52:09+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#primaryimage","url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1","width":903,"height":248,"caption":"server-management"},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-configure-your-server-correctly-in-2020\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Configure Your Server Correctly in 2020"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2017\/03\/server-management-banner.jpg?fit=903%2C248&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2763"}],"version-history":[{"count":2,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2763\/revisions"}],"predecessor-version":[{"id":2769,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2763\/revisions\/2769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media\/175"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}