{"id":622,"date":"2012-09-16T19:31:03","date_gmt":"2012-09-16T19:31:03","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=622"},"modified":"2022-12-19T06:32:47","modified_gmt":"2022-12-19T12:32:47","slug":"prevent-dos-brute-force-attacks-with-mod_evasive","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/","title":{"rendered":"Prevent DoS\/Brute-Force attacks with mod_evasive"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"size-full wp-image-623 alignleft\" title=\"mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\" alt=\"How to install and configure mod_evasive on ArchLinux VPS, Debian VPS, Ubuntu VPS, CentOS VPS\" width=\"254\" height=\"165\" \/><strong>What is mod_evasive?<\/strong><\/p>\n<p>mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, etc. mod_evasive presently reports abuses via email and syslog facilities.<\/p>\n<p><!--more--><\/p>\n<p>The following article is all about how to install and configure\u00a0<strong>mod_evasive\u00a0<\/strong>on the following gnu\/linux distributions running on our <a title=\"Linux Virtual Servers\" href=\"https:\/\/www.rosehosting.com\/vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">virtual private servers<\/a>:<\/p>\n<ul>\n<li><a href=\"#ubuntu-debian\">Installation on Debian<\/a><\/li>\n<li><a href=\"#ubuntu-debian\">Installation on Ubuntu<\/a><\/li>\n<li><a href=\"#centos5\">Installation on CentOS 5<\/a><\/li>\n<li><a href=\"#centos6\">Installation on CentOS 6<\/a><\/li>\n<li><a href=\"#archlinux\">Installation on Arch Linux<\/a><\/li>\n<li><a href=\"#gentoo\">Installation on Gentoo<\/a><\/li>\n<\/ul>\n<p><strong>So, let&#8217;s start by following the above un-ordered list.<\/strong><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69cde3279e69a\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69cde3279e69a\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#Installation-on-Debian-Ubuntu\" >Installation on Debian \/ Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#Installation-on-CentOS-5\" >Installation on CentOS 5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#Installation-on-CentOS-6\" >Installation on CentOS 6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#Installation-on-Arch-Linux\" >Installation on Arch Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#Installation-on-Gentoo-Linux\" >Installation on Gentoo Linux<\/a><\/li><\/ul><\/nav><\/div>\n<h2 id=\"ubuntu-debian\"><span class=\"ez-toc-section\" id=\"Installation-on-Debian-Ubuntu\"><\/span>Installation on Debian \/ Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The installation of <strong>mod_evasive\u00a0<\/strong>in a <a title=\"Debian virtual server\" href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Debian<\/a> \/ <a title=\"Ubuntu virtual server\" href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu<\/a> based VPS is identical. Before we go any steps further with the installation, make sure you have an up-to date system by issuing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># apt-get update &amp;&amp; apt-get upgrade --show-upgraded<\/pre>\n<p>Next, install <strong>Apache&#8217;s module mod_evasive<\/strong> by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># apt-get install libapache2-mod-evasive -y<\/pre>\n<p>Once the installation is finished, execute the following commands to <strong>configure Apache to use mod_evasive module<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># cat &gt;&gt; \/etc\/httpd\/conf.d\/mod_evasive.conf &lt;&lt;EOF\r\n&lt;IfModule mod_evasive20.c&gt;\r\nDOSHashTableSize 3097\r\nDOSPageCount 5\r\nDOSSiteCount 50\r\nDOSPageInterval 1\r\nDOSSiteInterval 1\r\nDOSBlockingPeriod 60\r\nDOSEmailNotify your@email.com\r\nDOSLogDir \/var\/log\/apache2\/evasive\r\n&lt;\/IfModule&gt;\r\nEOF<\/pre>\n<pre class=\"brush: shell; gutter: false\"># chown www-data: -R \/var\/log\/apache2\/<\/pre>\n<pre class=\"brush: shell; gutter: false\"># \/etc\/init.d\/apache2 restart<\/pre>\n<hr \/>\n<h2 id=\"centos5\"><span class=\"ez-toc-section\" id=\"Installation-on-CentOS-5\"><\/span>Installation on CentOS 5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>First, make sure your <a title=\"CentOS virtual server\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 5 VPS<\/a> is fully up to date by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum update -y<\/pre>\n<p>then proceed with <strong>adding the EPEL repository<\/strong> to your CentOS 5 so you can install mod_evasive through yum:<\/p>\n<pre class=\"brush: shell; gutter: false\"># rpm -Uvh ftp:\/\/ftp.pbone.net\/mirror\/download.fedora.redhat.com\/pub\/fedora\/epel\/5\/i386\/epel-release-5-4.noarch.rpm<\/pre>\n<p>Once it is added, protect the base packages from EPEL:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum install yum-protectbase.noarch -y<\/pre>\n<p>Refresh the repositories using:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum update -y<\/pre>\n<p>and finally <strong>install mod_evasive by executing<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum install mod_evasive -y<\/pre>\n<p>Then, proceed with <strong>configuring Apache to use the mod_evasive<\/strong> module:<\/p>\n<pre class=\"brush: shell; gutter: false\"># echo -e \"### LOAD EVASIVE ###\\nLoadModule evasive20_module \\\r\n modules\/mod_evasive20.so\\n###\\n\" &gt; \/etc\/httpd\/conf.d\/mod_evasive.conf<\/pre>\n<pre class=\"brush: shell; gutter: false\"># cat &gt;&gt; \/etc\/httpd\/conf.d\/mod_evasive.conf &lt;&lt;EOF\r\n&lt;IfModule mod_evasive20.c&gt;\r\nDOSHashTableSize 3097\r\nDOSPageCount 5\r\nDOSSiteCount 50\r\nDOSPageInterval 1\r\nDOSSiteInterval 1\r\nDOSBlockingPeriod 60\r\nDOSEmailNotify your@email.com\r\nDOSLogDir \/var\/log\/httpd\/evasive\r\n&lt;\/IfModule&gt;\r\nEOF<\/pre>\n<pre class=\"brush: shell; gutter: false\"># chown apache: -R \/var\/log\/httpd<\/pre>\n<pre class=\"brush: shell; gutter: false\"># \/etc\/init.d\/httpd restart<\/pre>\n<hr \/>\n<h2 id=\"centos6\"><span class=\"ez-toc-section\" id=\"Installation-on-CentOS-6\"><\/span>Installation on CentOS 6<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before installing mod_evasive on your <a title=\"CentOS VPS by RoseHosting.com\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 6 VPS<\/a>, make sure your operating system is fully up-to date by running:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum update -y<\/pre>\n<p>then proceed with <strong>adding the EPEL repository<\/strong> to your CentOS 6 so you can install mod_evasive through yum:<\/p>\n<pre class=\"brush: shell; gutter: false\"># rpm -Uvh ftp:\/\/ftp.pbone.net\/mirror\/download.fedora.redhat.com\/pub\/fedora\/epel\/6\/i386\/epel-release-6-8.noarch.rpm<\/pre>\n<p>Once it is added, protect the base packages from EPEL:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum install yum-plugin-protectbase.noarch -y<\/pre>\n<p>Refresh the repositories using:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum update -y<\/pre>\n<p>and finally <strong>install mod_evasive by executing<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># yum install mod_evasive -y<\/pre>\n<p>Then, proceed with <strong>configuring Apache to use the mod_evasive module<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># echo -e \"### LOAD EVASIVE ###\\nLoadModule evasive20_module \\\r\n modules\/mod_evasive20.so\\n###\\n\" &gt; \/etc\/httpd\/conf.d\/mod_evasive.conf<\/pre>\n<pre class=\"brush: shell; gutter: false\"># cat &gt;&gt; \/etc\/httpd\/conf.d\/mod_evasive.conf &lt;&lt;EOF\r\n&lt;IfModule mod_evasive20.c&gt;\r\nDOSHashTableSize 3097\r\nDOSPageCount 5\r\nDOSSiteCount 50\r\nDOSPageInterval 1\r\nDOSSiteInterval 1\r\nDOSBlockingPeriod 60\r\nDOSEmailNotify your@email.com\r\nDOSLogDir \/var\/log\/httpd\/evasive\r\n&lt;\/IfModule&gt;\r\nEOF<\/pre>\n<pre class=\"brush: shell; gutter: false\"># chown apache: -R \/var\/log\/httpd<\/pre>\n<pre class=\"brush: shell; gutter: false\"># \/etc\/init.d\/httpd restart<\/pre>\n<hr \/>\n<h2 id=\"archlinux\"><span class=\"ez-toc-section\" id=\"Installation-on-Arch-Linux\"><\/span>Installation on Arch Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Since mod_evasive is in AUR (Archlinux User Repository) you need to <strong>build the package<\/strong> and then <strong>install it via &#8216;pacman&#8217;<\/strong>. This can be accomplished either by using some AUR wrapper like &#8216;packer&#8217;, &#8216;yaourt&#8217;, &#8216;cower&#8217; etc&#8230; or by building the package manually via makepkg and then installing it via &#8216;pacman&#8217;.<\/p>\n<p>We are going to use the &#8216;makepkg&#8217; method here because those wrappers are all based on &#8216;makepkg&#8217; and &#8216;pacman&#8217;, so <strong>create the build directory<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># mkdir -p \/home\/build\/ &amp;&amp; cd \/home\/build\/<\/pre>\n<p>download the tar package containing the <a href=\"https:\/\/wiki.archlinux.org\/index.php\/PKGBUILD\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PKGBUILD<\/a> for mod_evasive:<\/p>\n<pre class=\"brush: shell; gutter: false\"># wget http:\/\/aur.archlinux.org\/packages\/mo\/mod_evasive\/mod_evasive.tar.gz<\/pre>\n<p>extract the tarball and change to the extracted directory by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># tar zxvf mod_evasive.tar.gz &amp;&amp; cd mod_evasive\/<\/pre>\n<p>before you proceed with building the package, <strong>make sure you have GCC<\/strong> installed on your <a title=\"Arch Linux virtual server\" href=\"https:\/\/www.rosehosting.com\/arch-linux-vps.html\" target=\"_blank\" rel=\"noopener noreferrer\">Arch Linux VPS<\/a>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># pacman -Sy gcc<\/pre>\n<p>then proceed with <strong>building and installing the mod_evasive package<\/strong>:<\/p>\n<pre class=\"brush: shell; gutter: false\"># makepkg -si --asroot<\/pre>\n<p>Once the installation is finished, proceed with <strong>creating a configuration for mod_evasive<\/strong> by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># echo 'LoadModule evasive20_module modules\/mod_evasive20.so' &gt; \/etc\/httpd\/conf\/extra\/mod_evasive.conf<\/pre>\n<pre class=\"brush: shell; gutter: false\"># cat &gt;&gt; \/etc\/httpd\/conf\/extra\/mod_evasive.conf &lt;&lt;EOF\r\n&lt;IfModule mod_evasive20.c&gt;\r\nDOSHashTableSize    3097\r\nDOSPageCount        5\r\nDOSSiteCount        50\r\nDOSPageInterval     1\r\nDOSSiteInterval     1\r\nDOSBlockingPeriod   60\r\nDOSEmailNotify \t\tyour@email.com\r\nDOSLogDir           \/var\/lock\/mod_evasive\r\n&lt;\/IfModule&gt;\r\nEOF<\/pre>\n<pre class=\"brush: shell; gutter: false\"># echo -e \"# Include mod_evasive options\\nInclude conf\/extra\/mod_evasive.conf\" &gt;&gt; \/etc\/httpd\/conf\/httpd.conf<\/pre>\n<pre class=\"brush: shell; gutter: false\"># rc.d restart httpd<\/pre>\n<hr \/>\n<h2 id=\"gentoo\"><span class=\"ez-toc-section\" id=\"Installation-on-Gentoo-Linux\"><\/span>Installation on Gentoo Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Firstly, it is recommended to update the &#8216;portage&#8217; tree by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\"># emerge --sync<\/pre>\n<p>Once the tree is updated, you need to <strong>compile the mod_evasive module using &#8217;emerge&#8217;<\/strong>. Before doing that, a &#8216;keyword&#8217; needs to be added for the package so if you&#8217;re on a x86 architecture execute the command below, else replace &#8216;x86&#8217; with &#8216;amd64&#8217;:<\/p>\n<pre class=\"brush: shell; gutter: false\"># echo '=www-apache\/mod_evasive-1.10.1 ~x86' &gt;&gt; \/etc\/portage\/package.accept_keywords<\/pre>\n<p>with that in place, compile the module using:<\/p>\n<pre class=\"brush: shell; gutter: false\"># emerge -av www-apache\/mod_evasive<\/pre>\n<p>once the package is compiled and installed, run:<\/p>\n<pre class=\"brush: shell; gutter: false\"># revdep-rebuild<\/pre>\n<p>and then proceed with creating mod_evasive&#8217;s configuration:<\/p>\n<pre class=\"brush: shell; gutter: false\"># cat &gt; \/etc\/apache2\/modules.d\/10_mod_evasive.conf &lt;&lt;EOF\r\n&lt;IfDefine EVASIVE&gt;\r\n\tLoadModule evasive_module modules\/mod_evasive.so\r\n\tDOSHashTableSize 3097\r\n\tDOSPageCount 5\r\n\tDOSSiteCount 50\r\n\tDOSPageInterval 1\r\n\tDOSSiteInterval 1\r\n\tDOSBlockingPeriod 60\r\n\tDOSEmailNotify your@email.com\r\n\tDOSLogDir \/var\/log\/apache2\/evasive\r\n&lt;\/IfDefine&gt;\r\nEOF<\/pre>\n<pre class=\"brush: shell; gutter: false\"># chown apache: -R \/var\/log\/apache2\/<\/pre>\n<p>Next, you need to <strong>tell your Apache to use the newly compiled mod_evasive module<\/strong>. In Gentoo this can be done by editing &#8216;\/etc\/conf.d\/apache2&#8217; and adding &#8216;-D EVASIVE&#8217; to &#8216;APACHE2_OPTS&#8217;, for example:<\/p>\n<pre class=\"brush: shell; gutter: false\">APACHE2_OPTS=\"-D DEFAULT_VHOST -D PHP5 -D EVASIVE\"<\/pre>\n<p>finally, restart apache for the changes to take effect:<\/p>\n<pre class=\"brush: shell; gutter: false\"># \/etc\/init.d\/apache2 restart<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>PS.<\/strong><\/span> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is mod_evasive? mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Prevent DoS\/Brute-Force attacks with mod_evasive\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#more-622\" aria-label=\"Read more about Prevent DoS\/Brute-Force attacks with mod_evasive\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":623,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1703,13,1707],"tags":[37,100,99,69,34,48,98,101,102,1152,59],"class_list":["post-622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-tutorials","category-web-servers","tag-apache","tag-archlinux","tag-attacks","tag-bruteforce","tag-centos","tag-debian","tag-dos","tag-gentoo","tag-mod_evasive","tag-rosehosting","tag-ubuntu","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting<\/title>\n<meta name=\"description\" content=\"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting\" \/>\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.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prevent DoS\/Brute-Force attacks with mod_evasive\" \/>\n<meta property=\"og:description\" content=\"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-16T19:31:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-19T12:32:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"254\" \/>\n\t<meta property=\"og:image:height\" content=\"165\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\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:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Prevent DoS\\\/Brute-Force attacks with mod_evasive\",\"datePublished\":\"2012-09-16T19:31:03+00:00\",\"dateModified\":\"2022-12-19T12:32:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/\"},\"wordCount\":626,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/06\\\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\",\"keywords\":[\"apache\",\"archlinux\",\"attacks\",\"bruteforce\",\"centos\",\"debian\",\"dos\",\"gentoo\",\"mod_evasive\",\"rosehosting\",\"ubuntu\"],\"articleSection\":[\"Security\",\"Tutorials\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/\",\"name\":\"Prevent DoS\\\/Brute-Force attacks with mod_evasive | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/06\\\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\",\"datePublished\":\"2012-09-16T19:31:03+00:00\",\"dateModified\":\"2022-12-19T12:32:47+00:00\",\"description\":\"Prevent DoS\\\/Brute-Force attacks with mod_evasive | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/06\\\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/06\\\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg\",\"width\":\"254\",\"height\":\"165\",\"caption\":\"How to install and configure mod_evasive on ArchLinux VPS, Debian VPS, Ubuntu VPS, CentOS VPS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/prevent-dos-brute-force-attacks-with-mod_evasive\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prevent DoS\\\/Brute-Force attacks with mod_evasive\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting","description":"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting","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.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/","og_locale":"en_US","og_type":"article","og_title":"Prevent DoS\/Brute-Force attacks with mod_evasive","og_description":"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2012-09-16T19:31:03+00:00","article_modified_time":"2022-12-19T12:32:47+00:00","og_image":[{"width":254,"height":165,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Prevent DoS\/Brute-Force attacks with mod_evasive","datePublished":"2012-09-16T19:31:03+00:00","dateModified":"2022-12-19T12:32:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/"},"wordCount":626,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg","keywords":["apache","archlinux","attacks","bruteforce","centos","debian","dos","gentoo","mod_evasive","rosehosting","ubuntu"],"articleSection":["Security","Tutorials","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/","url":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/","name":"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg","datePublished":"2012-09-16T19:31:03+00:00","dateModified":"2022-12-19T12:32:47+00:00","description":"Prevent DoS\/Brute-Force attacks with mod_evasive | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2012\/06\/mod-evasive-apache-centos-archilnux-gentoo-ubuntu-debian.jpg","width":"254","height":"165","caption":"How to install and configure mod_evasive on ArchLinux VPS, Debian VPS, Ubuntu VPS, CentOS VPS"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/prevent-dos-brute-force-attacks-with-mod_evasive\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Prevent DoS\/Brute-Force attacks with mod_evasive"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":2,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":44402,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions\/44402"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/623"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}