{"id":1312,"date":"2012-06-30T03:00:58","date_gmt":"2012-06-29T21:00:58","guid":{"rendered":"http:\/\/blog.amigas.ru\/?p=1312"},"modified":"2014-03-17T15:15:17","modified_gmt":"2014-03-17T09:15:17","slug":"sshblock-zashhita-ot-atak-po-slovaryu","status":"publish","type":"post","link":"http:\/\/blog.amigas.ru\/?p=1312","title":{"rendered":"SSHBlock &#8212; \u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0430\u0442\u0430\u043a \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044e"},"content":{"rendered":"<p>\u0425\u043e\u0442\u044c \u044d\u0442\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0438 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0440\u0430\u0434\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u043e\u043b\u044f. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 &#8212; \u0441\u043c\u0435\u043d\u0430 \u043f\u043e\u0440\u0442\u0430. \u041d\u043e \u043c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c. \u0421\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0443 \u0441 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u043e\u043c, \u0442\u043e\u0436\u0435 \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0418 \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u043e\u0432, \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u0433\u043b\u0430\u0437\u0430, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u0435\u0440\u043b\u0435, \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f \u0442\u043e \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 &#171;\u0432\u0430\u0433\u043e\u043d\u043e\u0432 \u0441 \u0442\u0435\u043b\u0435\u0436\u043a\u0430\u043c\u0438&#187; \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435&#8230;<br \/>\n<code><strong><span style=\"color: #333399;\">#cd \/usr\/ports\/security\/sshblock<\/span><\/strong><br \/>\n<strong><span style=\"color: #333399;\"> #make install clean<\/span><\/strong><br \/>\n<strong><span style=\"color: #333399;\"> #echo sshblock_enable=\"YES\" &gt;&gt; \/etc\/rc.conf<\/span><\/strong><br \/>\n<strong><span style=\"color: #333399;\"> #\/usr\/local\/etc\/rc.d\/sshblock start<\/span><\/strong><br \/>\n\u041e\u043f\u0446\u0438\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c:<br \/>\nUsage: sshblock [ -b ] [ -l ] [ -t ]<\/p>\n<p>Trigger list is a list of seconds:attempts threshold pairs for determining<br \/>\nwhether a host should be blocked (\u041f\u0430\u0440\u0430 - \u0432\u0440\u0435\u043c\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445:\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u0445\u043e\u0434\u0430)<\/p>\n<p>Default blockfile: \/etc\/hosts.allow<br \/>\nDefault logfile: \/var\/log\/auth.log<br \/>\n\u0412\u0441\u0451 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0432 \u0442\u0435\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<br \/>\n%SSHBlock::thresholds = (<br \/>\n# 5 attempts in 15 seconds<br \/>\n15 =&gt; 5,<br \/>\n# 10 attempts in 60 seconds<br \/>\n60 =&gt; 10,<br \/>\n# 20 attempts in one hour<br \/>\n3600 =&gt; 20,<br \/>\n# 30 attempts in one day<br \/>\n86400 =&gt; 30<\/code><br \/>\n\u042d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0425\u043e\u0442\u044c \u044d\u0442\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0438 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0440\u0430\u0434\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u043e\u043b\u044f. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 &#8212; \u0441\u043c\u0435\u043d\u0430 \u043f\u043e\u0440\u0442\u0430. \u041d\u043e \u043c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c. \u0421\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0443 \u0441 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u043e\u043c, \u0442\u043e\u0436\u0435 \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0418 \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u043e\u0432, \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u0433\u043b\u0430\u0437\u0430, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u0435\u0440\u043b\u0435, \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f \u0442\u043e \u0447\u0442\u043e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[78],"tags":[149],"class_list":["post-1312","post","type-post","status-publish","format-standard","hentry","category-shell","tag-freebsd"],"views":1081,"_links":{"self":[{"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/posts\/1312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1312"}],"version-history":[{"count":5,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/posts\/1312\/revisions"}],"predecessor-version":[{"id":2037,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=\/wp\/v2\/posts\/1312\/revisions\/2037"}],"wp:attachment":[{"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1312"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.amigas.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}