{"id":567,"date":"2018-05-30T01:54:00","date_gmt":"2018-05-30T06:54:00","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=567"},"modified":"2024-10-07T03:14:01","modified_gmt":"2024-10-07T08:14:01","slug":"how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/","title":{"rendered":"How to Install mod_security and mod_evasive on Ubuntu 16.04"},"content":{"rendered":"<div id=\"linux-2132617085\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and secure the Apache web server by installing and configuring mod_security and mod_evasive Apache modules.<\/p>\n<p>Mod_security is a free web application firewall (WAF) Apache module that helps to protect your website from various attacks such as PHP and SQL injection attacks, cross-site scripting, path traversal attacks etc. Also, it allows for real-time analysis and HTTP traffic monitoring with little or no changes of the existing Apache configuration. Mod_evasive is an Apache module that helps to prevent server brute force attacks and HTTP DoS (DDoS) attacks.<!--more--><\/p>\n<h2><strong>Login via SSH and update the system<\/strong><\/h2>\n<p>To begin, log in to your Ubuntu 16.04 VPS via SSH as user root<\/p>\n<pre>ssh root@IP_Address -p Port_number<\/pre>\n<p>Make sure that all OS packages are up to date by running the following command-line commands:<\/p>\n<pre>apt-get update\napt-get upgrade<\/pre>\n<p>You can also enable automatic updates on your VPS.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>The mod_security and mod_evasive Apache modules have several requirements which we have to install on the server in order to run them. We need to have Apache server installed and running with enabled mod_headers module.<br \/>\nInstall Apache, enable it to start on boot and start the Apache service:<\/p>\n<pre>sudo apt-get install apache2 -y\nsudo systemctl enable apache2.service\nsudo systemctl start apache2.service<\/pre>\n<p>Then, enable the\u00a0mod_headers module using the following command:<\/p>\n<pre>sudo a2enmod headers<\/pre>\n<h2>Install mod_security<\/h2>\n<p>Installation of the mod_security module is quite simple. Run the following command:<\/p>\n<pre>apt-get install libapache2-modsecurity<\/pre>\n<p>After installing, run the following command to enable the mod_security Apache module:<\/p>\n<pre>sudo a2enmod security2<\/pre>\n<p>We can check if mod_security module is active and enabled using the following command:<\/p>\n<pre>apachectl -M | grep security<\/pre>\n<p>If you see the following output:<\/p>\n<pre>security2_module (shared)<\/pre>\n<p>it means that mod_security module is enabled. There are no security rules configured by default, so we need to enable the mod_security rules. In order to do so, copy the recommended mod_security configuration file, then edit it and set the \u2018SecRuleEngine\u2019 option to On:<\/p>\n<pre>sudo cp \/etc\/modsecurity\/modsecurity.conf{-recommended,}\nsudo vi \/etc\/modsecurity\/modsecurity.conf<\/pre>\n<pre>SecRuleEngine On<\/pre>\n<p>Also, locate the line &#8216;SecResponseBodyAccess On&#8217; and change it to:<\/p>\n<pre>SecResponseBodyAccess Off<\/pre>\n<p>It will disable response body inspection and save server resources.<br \/>\nThe mod_security rules are available in following directories:<\/p>\n<pre>\/usr\/share\/modsecurity-crs\/base_rules\n\/usr\/share\/modsecurity-crs\/optional_rules\n\/usr\/share\/modsecurity-crs\/experimental_rules<\/pre>\n<p>1. To enable all of the CRS base rules, create symbolic links using the following command:<\/p>\n<pre>sudo ln -s \/usr\/share\/modsecurity-crs\/base_rules\/*.conf \/usr\/share\/modsecurity-crs\/activated_rules\/<\/pre>\n<p>To enable the CRS optional and experimental rules files you may want to use, create symbolic links under the \u2018activated_rules\u2019 directory location accordingly.<\/p>\n<p>2. Alternatively, configure and enable the Open Web Application Security Project (OWASP) core rule set:<\/p>\n<pre>sudo apt-get install git\nsudo git clone https:\/\/github.com\/SpiderLabs\/owasp-modsecurity-crs.git\nsudo mv \/usr\/share\/modsecurity-crs \/usr\/share\/modsecurity-crs.bak\nsudo mv owasp-modsecurity-crs \/usr\/share\/modsecurity-crs\nsudo mv \/usr\/share\/modsecurity-crs\/crs-setup.conf.example \/usr\/share\/modsecurity-crs\/crs-setup.conf<\/pre>\n<p>In both cases, we need to edit the \/etc\/apache2\/mods-enabled\/security2.conf file:<\/p>\n<pre>\/etc\/apache2\/mods-enabled\/security2.conf<\/pre>\n<p>Add these lines at the end:<\/p>\n<pre>IncludeOptional \"\/usr\/share\/modsecurity-crs\/*.conf\nIncludeOptional \"\/usr\/share\/modsecurity-crs\/rules\/*.conf<\/pre>\n<p>For the changes to take effect, restart Apache with the command:<\/p>\n<pre>systemctl restart apache2<\/pre>\n<p>Check the \/var\/log\/apache2\/modsec_audit.log log file to find the rules that are being triggered by mod_security on your Apache web server. The error log is the same log file that is used by Apache to write error messages, normally stored at \/var\/log\/apache2\/error.log.<br \/>\nInstall mod_evasive<\/p>\n<p>Install the mod_evasive module using the following command:<\/p>\n<pre>apt-get install libapache2-mod-evasive<\/pre>\n<p>After installing, run this command:<\/p>\n<pre>sudo a2enmod evasive<\/pre>\n<p>Edit the mod-evasive.conf file and configure mod_evasive module:<\/p>\n<pre>sudo vi \/etc\/apache2\/mods-available\/mod-evasive.conf<\/pre>\n<p>DOSHashTableSize 3097<br \/>\nDOSPageCount 10<br \/>\nDOSSiteCount 30<br \/>\nDOSPageInterval 1<br \/>\nDOSSiteInterval 3<br \/>\nDOSBlockingPeriod 3600<br \/>\nDOSLogDir \/var\/log\/apache2\/mod_evasive.log<\/p>\n<p>Save and close that file.<br \/>\nFor more details on the various configuration parameters, check the README file included with mod_evasive module.<br \/>\nUse the following command to check if mod_evasive module is active and enabled:<\/p>\n<pre>evasive20_module (shared)<\/pre>\n<p>Create a log file for mod_evasive:<\/p>\n<pre>touch \/var\/log\/apache2\/mod_evasive.log\nsudo chown www-data:www-data \/var\/log\/apache2\/mod_evasive.log<\/pre>\n<p>Run the following command to restart Apache:<\/p>\n<pre>systemctl restart apache2<\/pre>\n<p>That is it. Mod_security and mod_evasive modules have been successfully installed on your Ubuntu VPS.<\/p>\n<h2>Conclusion<\/h2>\n<p>In order to harden and secure your Apache web server it is a good idea to install and configure mod_security and mod_evasive modules on a Linux VPS with Ubuntu 16.04 OS installed on it.<\/p>\n<hr \/>\n<p>Of course you don\u2019t have to install\u00a0mod_security and mod_evasive on Ubuntu 16.04, if you use one of our <a href=\"https:\/\/linuxhostsupport.com\/monthly-server-management.html\">server support services<\/a>, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24&#215;7 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on how to install mod_security and mod_evasive on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p><div id=\"linux-4100902058\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and secure the Apache web server by installing and configuring mod_security and mod_evasive Apache modules. Mod_security is a free web application firewall (WAF) Apache module that helps [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":568,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[101,100,96],"class_list":["post-567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-mod_evasive","tag-mod_security","tag-ubuntu-16-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-30T06:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-07T08:14:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How to Install mod_security and mod_evasive on Ubuntu 16.04\",\"datePublished\":\"2018-05-30T06:54:00+00:00\",\"dateModified\":\"2024-10-07T08:14:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/\"},\"wordCount\":730,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg\",\"keywords\":[\"mod_evasive\",\"mod_security\",\"ubuntu 16.04\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/\",\"name\":\"How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg\",\"datePublished\":\"2018-05-30T06:54:00+00:00\",\"dateModified\":\"2024-10-07T08:14:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg\",\"contentUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg\",\"width\":750,\"height\":410,\"caption\":\"How to Install mod_security and mod_evasive on Ubuntu 16.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install mod_security and mod_evasive on Ubuntu 16.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport","description":"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and","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:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport","og_description":"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2018-05-30T06:54:00+00:00","article_modified_time":"2024-10-07T08:14:01+00:00","og_image":[{"width":750,"height":410,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How to Install mod_security and mod_evasive on Ubuntu 16.04","datePublished":"2018-05-30T06:54:00+00:00","dateModified":"2024-10-07T08:14:01+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/"},"wordCount":730,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg","keywords":["mod_evasive","mod_security","ubuntu 16.04"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/","name":"How to Install mod_security and mod_evasive on Ubuntu 16.04 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg","datePublished":"2018-05-30T06:54:00+00:00","dateModified":"2024-10-07T08:14:01+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"Apache is a very popular web server, and with that popularity comes a need to ensure its security. In this tutorial, we will show you how to harden and","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2018\/05\/How-to-Install-mod_security-and-mod_evasive-on-Ubuntu-16.04.jpg","width":750,"height":410,"caption":"How to Install mod_security and mod_evasive on Ubuntu 16.04"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-ubuntu-16-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install mod_security and mod_evasive on Ubuntu 16.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":2,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":2201,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions\/2201"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/568"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}