{"id":842,"date":"2010-05-09T14:59:15","date_gmt":"2010-05-09T12:59:15","guid":{"rendered":"http:\/\/netspider.com.ua\/index.php\/2010\/05\/09\/pogranichnye-vojny\/"},"modified":"2010-05-09T15:11:35","modified_gmt":"2010-05-09T13:11:35","slug":"pogranichnye-vojny","status":"publish","type":"post","link":"https:\/\/netspider.com.ua\/index.php\/2010\/05\/09\/pogranichnye-vojny\/","title":{"rendered":"\u041f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0432\u043e\u0439\u043d\u044b"},"content":{"rendered":"<p>\u041d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0441\u0438\u043b\u044c\u043d\u0443\u044e DDoS-\u0430\u0442\u0430\u043a\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0431\u0438\u0442\u044c (\u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c) \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u0436\u0435\u043b\u0435\u0437\u043a\u0430 [\u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e] \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430. \u0411\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0438\u043b\u0430\u043c\u0438 (\u0441\u0438\u043b\u0430\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u041e\u0421\u0438) \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0430\u0442\u0430\u043a\u0430\u043c\u0438 \u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u043b\u043a\u0438\u043c\u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u0430\u043a \u0442\u043e \u043f\u043e\u0434\u0431\u043e\u0440 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 (\u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441), \u043d\u0430\u043f\u043b\u044b\u0432 \u043d\u0435\u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0444\u0438\u043a\u0430 (\u043a\u0438\u0442\u0430\u0439\u0446\u0435\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0441\u0430\u0439\u0442 \ud83d\ude42 ), \u0432\u0437\u043b\u043e\u043c \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0442.\u043f.<\/p>  <p>\u041e\u0442 \u043d\u0430\u043f\u043b\u044b\u0432\u0430 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u0437 \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e \u043a\u043e\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u044b, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 GeoIP \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439&#160; \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b\u0435 .htaccess:<\/p>  <pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nSetEnvIf GEOIP_COUNTRY_CODE CN BadCountry\nSetEnvIf GEOIP_COUNTRY_CODE TW BadCountry\nOrder Deny,Allow\nDeny from env=BadCountry\n\nAllow from 1.2.3.4 # \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0439 \u0441\u0442\u0440\u0430\u043d\u044b\nAllow from 2.3.4.5 # \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0439 \u0441\u0442\u0440\u0430\u043d\u044b\n<\/pre><\/pre>\n\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0440\u0430\u043d\u0430\u043c:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nSetEnvIf GEOIP_COUNTRY_CODE UA GoodCountry\nSetEnvIf GEOIP_COUNTRY_CODE RU GoodCountry\nOrder Allow,Deny\nAllow from env=GoodCountry\n<\/pre><\/pre>\n\n<h5>Under Attack: \u0440\u0443\u0431\u0438\u043c \u0441 \u043f\u043b\u0435\u0447\u0430<\/h5>\n\n<p>\u0415\u0441\u043b\u0438 \u0441\u0430\u0439\u0442 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f DDoS-\u0430\u0442\u0430\u043a\u0435 \u0438 \u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u0447\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0434\u0443\u0442 \u0438\u0437 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b, \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0443 \u0432 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 Apache.<\/p>\n\n<p>&#160;<\/p>\n<!--more-->\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nwget https:\/\/www.maxmind.com\/download\/geoip\/database\/GeoIPCountryCSV.zip\nunzip GeoIPCountryCSV.zip\nmake -C \/usr\/ports\/www\/nginx fetch\ntar tvf \/usr\/ports\/distfiles\/nginx-0.7.65.tar.gz | grep geo2\ntar xvf \/usr\/ports\/distfiles\/nginx-0.7.65.tar.gz nginx-0.7.65\/contrib\/geo2nginx.pl\nmv nginx-0.7.65\/contrib\/geo2nginx.pl . &amp;&amp; chmod 700 geo2nginx.pl &amp;&amp; rm -rf nginx-0.7.65\/\ncat GeoIPCountryWhois.csv | .\/geo2nginx.pl | grep CN | awk '{print $1}' &gt; ips.list\n<\/pre><\/pre>\n\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 ips.list \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a IP-\u0441\u0435\u0442\u0435\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2013 \u041a\u0438\u0442\u0430\u044f\/CN). \n  <br \/><strong>NB<\/strong> \n\n  <br \/><em>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 GeoIP \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438.<\/em><\/p>\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u0444\u0430\u0435\u0440\u0432\u043e\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nipfw add deny all from table\\(1\\) to me\n<\/pre><\/pre>\n\n<p>\u041c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0431\u0435\u0437 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043c\u043e\u0436\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u043d\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd \/usr\/src\/sys\/modules\/ipfw\n<\/pre><\/pre>\n\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c Makefile, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nCFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT\n<\/pre><\/pre>\n\n<p>\u0438\u043d\u0430\u0447\u0435 \u043e\u0442\u0440\u0443\u0431\u0438\u043c \u043c\u0430\u0448\u0438\u043d\u0443 \u043e\u0442 \u0441\u0435\u0442\u0438 =) \n  <br \/>\u0414\u0430\u043b\u044c\u0448\u0435:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmake\ncp ipfw.ko \/boot\/kernel\/.\nkldload ipfw\ncd -\n<\/pre><\/pre>\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nipfw show\n<\/pre><\/pre>\n\n<p>\u0414\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 &quot;{\u0446\u0438\u0444\u0440\u044b} allow ip from any to any&quot;.<\/p>\n\n<p>\u0417\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a\u043e\u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/sh\n\nlips=`cat ips.list`\nfor f in ${lips}\ndo\n   IP=$f\n   \/sbin\/ipfw table 1 add $IP\ndone\n<\/pre><\/pre>\n\n<p>\u041c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043b\u0438 \u0437\u0430\u0431\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0430\u0439\u043f\u0438\u0448\u043d\u0438\u043a\u0438:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nipfw show\n<\/pre><\/pre>\n\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0431\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439:<\/p>\n\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nipfw table 1 list | wc -l\n<\/pre><\/pre>\n\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f. \u0410 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0442\u043e \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u043e\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0442\u0438\u0441\u043a\u043e\u043c \u0432\u0440\u0430\u0433\u0430. \ud83d\ude42<\/p>","protected":false},"excerpt":{"rendered":"\u041d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0441\u0438\u043b\u044c\u043d\u0443\u044e DDoS-\u0430\u0442\u0430\u043a\u0443 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0431\u0438\u0442\u044c (\u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c) \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u0436\u0435\u043b\u0435\u0437\u043a\u0430 [\u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e] \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430. \u0411\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0438\u043b\u0430\u043c\u0438 (\u0441\u0438\u043b\u0430\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u041e\u0421\u0438) \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0430\u0442\u0430\u043a\u0430\u043c\u0438 \u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u043b\u043a\u0438\u043c\u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u0430\u043a \u0442\u043e \u043f\u043e\u0434\u0431\u043e\u0440 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 (\u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441), \u043d\u0430\u043f\u043b\u044b\u0432 \u043d\u0435\u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0444\u0438\u043a\u0430 (\u043a\u0438\u0442\u0430\u0439\u0446\u0435\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0441\u0430\u0439\u0442 \ud83d\ude42 ), \u0432\u0437\u043b\u043e\u043c \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0442.\u043f. \u041e\u0442 \u043d\u0430\u043f\u043b\u044b\u0432\u0430 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 \u0438\u0437 \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u2026 <span class=\"read-more\"><a href=\"https:\/\/netspider.com.ua\/index.php\/2010\/05\/09\/pogranichnye-vojny\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;<\/a><\/span>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1049,1052,519,1050,48,1053,1054,1055,1051,1061,667,415,1796,1059,1058,1056,1060,1057],"class_list":["post-842","post","type-post","status-publish","format-standard","hentry","category-main","tag-attack","tag-china","tag-ddos","tag-firewall","tag-freebsd","tag-geoip","tag-geoipcountry","tag-htaccess","tag-ipfw","tag-nginx","tag-server","tag-shell","tag-unix","tag-ataka","tag-brendmauer","tag-zashhita","tag-kitaj","tag-faervol"],"_links":{"self":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/comments?post=842"}],"version-history":[{"count":0,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/842\/revisions"}],"wp:attachment":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/media?parent=842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/categories?post=842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/tags?post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}