{"id":2864,"date":"2012-07-09T07:32:12","date_gmt":"2012-07-09T07:32:12","guid":{"rendered":"http:\/\/www.theperfectarts.com\/?p=2864"},"modified":"2014-11-21T06:56:11","modified_gmt":"2014-11-21T06:56:11","slug":"install-mod_evasive","status":"publish","type":"post","link":"https:\/\/www.ktchost.com\/blog\/install-mod_evasive\/","title":{"rendered":"Install Mod_evasive"},"content":{"rendered":"<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\nvar _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text\/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https:\/\/ssl' : 'http:\/\/www') + '.google-analytics.com\/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();\n\/\/ ]]><\/script><br \/>\nTo protect the server from the DoS\/DDoS attack and brute force attack the Mod_evasive is used because its majoring the Apache concurrent connection and restrict it as per value defined in the Mod_evasive.<\/p>\n<p>Refer to the following steps to install the Mod_evasive but make sure that you have logged in as a root user.<\/p>\n<p><strong>cd \/usr\/local\/src<\/strong><\/p>\n<p><strong>wget http:\/\/theperfectarts.com\/software\/mod_evasive_1.10.1.tar.gz<\/strong><\/p>\n<p><strong>tar xvfz mod_ev*<\/strong><\/p>\n<p><strong>cd mod_evasive*<\/strong><\/p>\n<p><strong>CPANEL &amp; Apache 1<\/strong><\/p>\n<p><strong>\/usr\/local\/apache\/bin\/apxs -i -a -c mod_evasive.c<\/strong><\/p>\n<p><strong>\/etc\/init.d\/httpd restart<\/strong><\/p>\n<p><strong>CPANEL &amp; Apache 2<\/strong><\/p>\n<p><strong>\/usr\/local\/apache\/bin\/apxs -i -a -c mod_evasive20.c<\/strong><\/p>\n<p><strong>\/etc\/init.d\/httpd restart<\/strong><\/p>\n<p><strong>PLESK &amp; Apache 1<\/strong><\/p>\n<p><strong>\/usr\/sbin\/apxs -i -a -c mod_evasive.c<\/strong><\/p>\n<p><strong>\/etc\/init.d\/httpd restart<\/strong><\/p>\n<p><strong>PLESK &amp; Apache 2<\/strong><\/p>\n<p><strong>\/usr\/sbin\/apxs -i -a -c mod_evasive20.c<\/strong><\/p>\n<p><strong>\/etc\/rc.d\/init.d\/httpd restart<\/strong><\/p>\n<p>To create the default mod_evasive settings add the following in the server main Apache\u00a0configuration &#8220;httpd.conf&#8221;.<\/p>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\ngoogle_ad_client = \"ca-pub-1685490665026631\"; \/* banner small *\/ google_ad_slot = \"7551207214\"; google_ad_width = 468; google_ad_height = 60;\n\/\/ ]]><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\/\/ < ![CDATA[\n\n\/\/ ]]><\/script><\/p>\n<blockquote>\n<pre dir=\"ltr\"><strong>&lt;IfModule mod_evasive&gt;<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSHashTableSize 3097\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSPageCount 2\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSSiteCount 50\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSPageInterval 1\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSSiteInterval 1\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>DOSBlockingPeriod 10\u00a0<\/strong><\/pre>\n<pre dir=\"ltr\"><strong>&lt;\/IfModule&gt;<\/strong><\/pre>\n<\/blockquote>\n<p>You can adjust the above settings as per your requirement but make sure that you have taken the working Apache (httpd.conf) main configuration backup before making any changes.<\/p>\n<pre dir=\"ltr\"><strong>DOSHashTableSize : -<\/strong> This is Size for the hash table used to store the IPs address.<\/pre>\n<pre dir=\"ltr\"><strong>DOSPageCount : - <\/strong>Its used for number of pages allowed per DOSPageInterval.<\/pre>\n<pre dir=\"ltr\"><strong>DOSSiteCount : - <\/strong>The number of objects allowed per DOSSiteInterval.<\/pre>\n<pre dir=\"ltr\"><strong>DOSPageInterval : - <\/strong>The time is in seconds used by DOSPageCount.<\/pre>\n<pre dir=\"ltr\"><strong>DOSSiteInterval : - <\/strong>The<strong> <\/strong>Time is in seconds used by DOSSiteCount.<\/pre>\n<pre dir=\"ltr\"><strong>DOSBlockingPeriod : - <\/strong>The<strong> <\/strong>Time is in seconds that IPs will be banned in the firewall. If an IP tries to access the server within this period, the count will be restarted.<\/pre>\n<pre dir=\"ltr\"><\/pre>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\ngoogle_ad_client = \"ca-pub-1685490665026631\"; \/* banner small *\/ google_ad_slot = \"7551207214\"; google_ad_width = 468; google_ad_height = 60;\n\/\/ ]]><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\/\/ < ![CDATA[\n\n\/\/ ]]><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>To protect the server from the DoS\/DDoS attack and brute force attack the Mod_evasive is used because its majoring the Apache concurrent connection and restrict <a class=\"mh-excerpt-more\" href=\"https:\/\/www.ktchost.com\/blog\/install-mod_evasive\/\" title=\"Install Mod_evasive\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-2864","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2864"}],"collection":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/comments?post=2864"}],"version-history":[{"count":3,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2864\/revisions"}],"predecessor-version":[{"id":3785,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2864\/revisions\/3785"}],"wp:attachment":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/media?parent=2864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/categories?post=2864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/tags?post=2864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}