{"id":3106,"date":"2014-01-16T20:37:55","date_gmt":"2014-01-16T20:37:55","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=2411"},"modified":"2014-01-16T20:37:55","modified_gmt":"2014-01-16T20:37:55","slug":"protect-apache-using-mod_evasive-rhelcentos-fedora","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2014\/01\/16\/protect-apache-using-mod_evasive-rhelcentos-fedora\/","title":{"rendered":"Protect Apache using Mod_evasive on RHEL\/CentOS &#038; Fedora"},"content":{"rendered":"<h3>How to Install Mod_Evasive in RHEL\/CentOS &amp; Fedora<\/h3>\n<p>As we already installed required dependency packages above, so let\u2019s install the mod_evasive module.<\/p>\n<h4>Step 1: Installing Mod_Evasive<\/h4>\n<p>Just run the following commands to install mod_evasive.<\/p>\n<pre><strong>## For RHEL\/CentOS 6.2\/6.1\/6\/5.8 ##<\/strong>\n# cd \/usr\/src \n# wget http:\/\/www.zdziarski.com\/blog\/wp-content\/uploads\/2010\/02\/mod_evasive_1.10.1.tar.gz\n# tar xzf mod_evasive_1.10.1.tar.gz\n# cd mod_evasive\n# apxs -cia mod_evasive20.c<strong>## For Fedora 17,16,15,14,13,12 ##<\/strong>\n# cd \/usr\/src \n# wget http:\/\/www.zdziarski.com\/blog\/wp-content\/uploads\/2010\/02\/mod_evasive_1.10.1.tar.gz\n# tar xzf mod_evasive_1.10.1.tar.gz\n# cd mod_evasive\n# apxs -cia mod_evasive20.c<\/pre>\n<h4>Step 2: Configuring Mod_Evasive<\/h4>\n<p>By default installation adds the following line of mod_evasive configuration to your Apache configuration file. Please verify that it should be there like similar to below. If you can\u2019t see this below line, then add this to your httpd.conf file.<\/p>\n<pre>LoadModule evasive20_module   \/usr\/lib\/httpd\/modules\/mod_evasive20.so<\/pre>\n<p>Now add the mod_evasive configuration parameters to your Apache configuration at the end. Replace\u00a0<strong>someone@somewhere.com<\/strong>\u00a0with your Email Id to get email alerts.<\/p>\n<pre>&lt;IfModule mod_evasive20.c&gt;\nDOSHashTableSize    3097\nDOSPageCount        2\nDOSSiteCount        50\nDOSPageInterval     1\nDOSSiteInterval     1\nDOSBlockingPeriod   60\nDOSEmailNotify <strong>someone@somewhere.com<\/strong>\n&lt;\/IfModule&gt;<\/pre>\n<p>Next restart the Apache service to update changes.<\/p>\n<pre># \/etc\/init.d\/httpd restart<\/pre>\n<p>For more additional information visit the\u00a0<a href=\"http:\/\/www.zdziarski.com\/blog\/?page_id=442\" target=\"_blank\" rel=\"noopener noreferrer\">mod_evasive Home Page<\/a>.<\/p>\n<p>Please drop your comments for any queries on installation, we will love to help you out and don\u2019t forget to Subscribe to our Updates.<\/p>\n<h3 class=\"zemanta-related-title\" style=\"margin: 0 0 10px 0; padding: 0; clear: both;\">Related articles across the web<\/h3>\n<ul class=\"zemanta-article-ul zemanta-article-ul-image\" style=\"margin: 0; padding: 0; overflow: hidden;\">\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/optimise-tweak-high-traffic-servers\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/238622182_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/optimise-tweak-high-traffic-servers\/\" target=\"_blank\" rel=\"noopener noreferrer\">Optimise and Tweak High-Traffic Servers<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.madjoudj.com\/2013\/12\/getting-started-with-modsecurity-for.html\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/noimg_6_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.madjoudj.com\/2013\/12\/getting-started-with-modsecurity-for.html\" target=\"_blank\" rel=\"noopener noreferrer\">Getting started with ModSecurity for Nginx<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/optimise-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/238622181_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/optimise-cpanelwhm-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Optimise cPanel\/WHM Server<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/create-ssl-certificate-apache-centos-6\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/232740922_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/create-ssl-certificate-apache-centos-6\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Create a SSL Certificate on Apache for CentOS 6<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How to Install Mod_Evasive in RHEL\/CentOS &amp; Fedora As we already installed required dependency packages above, so let\u2019s install the mod_evasive module. Step 1: Installing Mod_Evasive Just run the following commands to install mod_evasive. ## For RHEL\/CentOS 6.2\/6.1\/6\/5.8 ## # cd \/usr\/src # wget http:\/\/www.zdziarski.com\/blog\/wp-content\/uploads\/2010\/02\/mod_evasive_1.10.1.tar.gz # tar xzf mod_evasive_1.10.1.tar.gz # cd mod_evasive # apxs -cia [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[53,60],"tags":[185],"class_list":["post-3106","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","tag-mod_evasive-install-centos"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=3106"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3106\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=3106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=3106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=3106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}