{"id":1383,"date":"2011-08-02T15:24:52","date_gmt":"2011-08-02T12:24:52","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=1383"},"modified":"2013-05-29T14:15:49","modified_gmt":"2013-05-29T11:15:49","slug":"%d0%b7%d0%b0%d1%89%d0%b8%d1%89%d0%b0%d0%b5%d0%bc-web-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80%d0%b0-%d0%be%d1%82-ddosa","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=1383","title":{"rendered":"\u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c Web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442 DDoS&#8217;a"},"content":{"rendered":"<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 <strong>DDoS&#8217;a<\/strong> \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 <strong>apache<\/strong> \u0438 <strong>nginx<\/strong>. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 <strong>100%<\/strong> \u043f\u0430\u043d\u0430\u0446\u0435\u044f \u0438 \u0432\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 \u0430\u0442\u0430\u043a. \u041d\u043e \u0432\u0441\u0451 \u0436\u0435, \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0430\u0442\u0430\u043a \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442<\/p>\n<p><!--more--><strong><span style=\"color: #ff0000;\">1) Apache<\/span><\/strong><\/p>\n<p>\u0414\u043b\u044f <strong>apache<\/strong> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <strong>mod_evasive<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p><strong><em><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0440:<\/span><\/em><\/strong><\/p>\n<p><code>&lt;IfModule mod_evasive20.c&gt;<br \/>\nDOSHashTableSize 3097<br \/>\nDOSPageCount 2<br \/>\nDOSSiteCount 50<br \/>\nDOSPageInterval 1<br \/>\nDOSSiteInterval 1<br \/>\nDOSBlockingPeriod 300<br \/>\n&lt;\/IfModule&gt;<\/code><\/p>\n<p><strong><em><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/span><\/em><\/strong><\/p>\n<p>\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0441\u0430\u0439\u0442\u0443 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e <strong>IP<\/strong>-\u0430\u0434\u0440\u0435\u0441\u0430, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0435\u0433\u043e, \u0432\u044b\u0434\u0430\u0432\u0430\u044f \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0448\u0438\u0431\u043a\u0443 <strong>403 Forbidden<\/strong>. \u041f\u0440\u0438 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0430\u043a\u0430\u0445 \u043d\u0430 \u0441\u0430\u0439\u0442 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<br \/>\n\u041d\u043e \u043f\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u0430\u0442\u0430\u043a\u0430\u0445 \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0435 \u0441\u043f\u0430\u0441\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u0436\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u00ab\u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e\u00bb \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 (<strong>403 Forbidden<\/strong>) \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<br \/>\n\u0412\u044b\u0445\u043e\u0434 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u2014 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <strong>IP<\/strong>-\u0430\u0434\u0440\u0435\u0441\u0430 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, <strong>mod_evasive<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442.<\/p>\n<p><strong><span style=\"color: #ff0000;\">2) Nginx<\/span><\/strong><\/p>\n<p>\u0414\u043b\u044f <strong>nginx&#8217;a<\/strong> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 <strong>0.7.21<\/strong>) \u043c\u043e\u0434\u0443\u043b\u044c <strong>ngx_http_limit_req_module<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <strong>limit_req_zone,<br \/>\nlimit_req, limit_req_log_level<\/strong> \u0432\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432\/\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p><strong><em><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0440:<\/span><\/em><\/strong><\/p>\n<p><code>limit_req_zone $binary_remote_addr zone=one:10m rate=5r\/s;<br \/>\nlimit_req zone=one burst=10;<\/code><\/p>\n<p><strong><em><span style=\"color: #ff6600;\">\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435:<\/span><\/em><\/strong><\/p>\n<p><strong>Nginx<\/strong> \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e <strong>5<\/strong> \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0430 \u0435\u0441\u043b\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 <strong>10<\/strong> \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0432\u0435\u0440\u0445\u0443, \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0441 <strong>503<\/strong>-\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041f\u0440\u0438\u0447\u0451\u043c <strong>5r\/s<\/strong> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a\u0430\u0436\u0434\u044b\u0435 <strong>200ms<\/strong>.<\/p>\n<p>\u0415\u0449\u0451 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u0449\u0438\u0442\u044b &#8211; \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439\u00a0<strong>testcookies<\/strong>, <strong>naxsi<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 DDoS&#8217;a \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 apache \u0438 nginx. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 100% \u043f\u0430\u043d\u0430\u0446\u0435\u044f \u0438 \u0432\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 \u0430\u0442\u0430\u043a. \u041d\u043e \u0432\u0441\u0451 \u0436\u0435, \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0430\u0442\u0430\u043a \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,15],"tags":[],"class_list":["post-1383","post","type-post","status-publish","format-standard","hentry","category-security","category-www"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1383"}],"version-history":[{"count":12,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1383\/revisions"}],"predecessor-version":[{"id":3479,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/1383\/revisions\/3479"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}