{"id":331,"date":"2016-11-21T08:44:15","date_gmt":"2016-11-21T01:44:15","guid":{"rendered":"http:\/\/www.st.ac.th\/krubuncha\/?p=331"},"modified":"2016-11-21T08:44:15","modified_gmt":"2016-11-21T01:44:15","slug":"how-to-protect-against-dos-and-ddos-with-mod_evasive-freebsd","status":"publish","type":"post","link":"https:\/\/www.st.ac.th\/krubuncha\/how-to-protect-against-dos-and-ddos-with-mod_evasive-freebsd\/","title":{"rendered":"How To Protect Against DoS and DDoS with mod_evasive (FREEBSD)"},"content":{"rendered":"<p>#cd \/usr\/port\/www\/mod_evasive<br \/>\n#make install clean<\/p>\n<p>#vi \/usr\/local\/etc\/apache24\/httpd.conf<\/p>\n<p>and insert If Module &#8230;.<br \/>\n&lt;IfModule evasive20_module&gt;<br \/>\n#increases size of hash table. Good, but uses more RAM.<br \/>\nDOSHashTableSize 3097<br \/>\n#Interval, in seconds, of the page interval.<br \/>\nDOSPageInterval 1<br \/>\n#Interval, in seconds, of the site interval.<br \/>\nDOSSiteInterval 1<br \/>\n#period, in seconds, a client is blocked. The counter is reset to 0 with every access within this interval.<br \/>\nDOSBlockingPeriod 10<br \/>\n#threshold of requests per page, per page interval. If hit == block.<br \/>\nDOSPageCount 2<br \/>\n#threshold of requests for any object by the same ip, on the same listener, per site interval.<br \/>\nDOSSiteCount 50<br \/>\n#locking mechanism prevents repeated calls. email can be sent when host is blocked (leverages the following by default &#8220;\/bin\/mail -t %s&#8221;)<br \/>\nDOSEmailNotify admin@st.ac.th<br \/>\n#locking mechanism prevents repeated calls. A command can be executed when a host is blocked. %s is the host IP.<br \/>\n#DOSSystemCommand &#8220;su &#8211; someuser -c &#8216;\/sbin\/&#8230; %s &#8230;'&#8221;<br \/>\n#DOSLogDir &#8220;\/var\/lock\/mod_evasive&#8221;<br \/>\n#whitelist an IP., leverage wildcards, not CIDR, like 127.0.0.*<br \/>\n#DOSWhiteList 127.0.0.1<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p># \/usr\/local\/etc\/rc.d\/apache24 restart<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>#cd \/usr\/port\/www\/mod_evasive #make install clean #vi \/usr\/local\/etc\/apache24\/httpd.conf and insert If Module &#8230;. &lt;IfModule evasive20_module&gt; #increases size of hash table. Good, but uses more RAM. DOSHashTableSize <a class=\"mh-excerpt-more\" href=\"https:\/\/www.st.ac.th\/krubuncha\/how-to-protect-against-dos-and-ddos-with-mod_evasive-freebsd\/\" title=\"How To Protect Against DoS and DDoS with mod_evasive (FREEBSD)\">[\u0e2d\u0e48\u0e32\u0e19\u0e15\u0e48\u0e2d]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":332,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category--freebsd"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?fit=343%2C147&ssl=1","blog_post_layout_featured_media_urls":{"thumbnail":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=150%2C147&ssl=1",150,147,true],"full":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?fit=343%2C147&ssl=1",343,147,false]},"categories_names":{"3":{"name":"\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e0a\u0e48\u0e27\u0e22\u0e08\u0e33 FreeBSD","link":"https:\/\/www.st.ac.th\/krubuncha\/category\/%e0%b8%9a%e0%b8%b1%e0%b8%99%e0%b8%97%e0%b8%b6%e0%b8%81%e0%b8%8a%e0%b9%88%e0%b8%a7%e0%b8%a2%e0%b8%88%e0%b8%b3-freebsd\/"}},"tags_names":[],"comments_number":0,"wpmagazine_modules_lite_featured_media_urls":{"thumbnail":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=150%2C147&ssl=1",150,147,true],"cvmm-medium":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=300%2C147&ssl=1",300,147,true],"cvmm-medium-plus":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=305%2C147&ssl=1",305,147,true],"cvmm-portrait":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=343%2C147&ssl=1",343,147,true],"cvmm-medium-square":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=343%2C147&ssl=1",343,147,true],"cvmm-large":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=343%2C147&ssl=1",343,147,true],"cvmm-small":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?resize=130%2C95&ssl=1",130,95,true],"full":["https:\/\/i0.wp.com\/www.st.ac.th\/krubuncha\/wp-content\/uploads\/sites\/19\/2016\/11\/mod_evasive.jpg?fit=343%2C147&ssl=1",343,147,false]},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Mvvj-5l","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/comments?post=331"}],"version-history":[{"count":1,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/posts\/331\/revisions\/333"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/media\/332"}],"wp:attachment":[{"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/media?parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/categories?post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.st.ac.th\/krubuncha\/wp-json\/wp\/v2\/tags?post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}