{"id":109,"date":"2018-08-30T11:30:42","date_gmt":"2018-08-30T08:30:42","guid":{"rendered":"http:\/\/guwi.ru\/?p=109"},"modified":"2018-08-30T11:30:42","modified_gmt":"2018-08-30T08:30:42","slug":"fail2ban","status":"publish","type":"post","link":"http:\/\/guwi.ru\/?p=109","title":{"rendered":"fail2ban, ufw, iptables"},"content":{"rendered":"<p>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW<\/p>\n<pre>ufw enable<\/pre>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW<\/p>\n<pre>ufw disable<\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 SSH):<\/p>\n<pre>sudo ufw allow 22<\/pre>\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 numbered:<\/p>\n<pre>sudo ufw status numbered<\/pre>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441 numbered 5<\/p>\n<pre>sudo ufw delete 5<\/pre>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 fail2ban \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 ip<\/strong><br \/>\n\u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (jail):<\/p>\n<pre>fail2ban-client status<\/pre>\n<pre>fail2ban-client status asterisk-security<\/pre>\n<p>\u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0431\u0430\u043d\u0438\u0442\u044c (\u0443\u0434\u0430\u043b\u0438\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 \u0441 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre>fail2ban-client set asterisk-security\u00a0unbanip\u00a0178.151.40.243<\/pre>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 iptables (\u0434\u043b\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438)<br \/>\n\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432:<\/p>\n<pre>iptables -L -n<\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441<\/p>\n<pre>iptables -I INPUT -s 37.49.231.122 -j DROP<\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b fail2ban-roundcube ip \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre>iptables -D fail2ban-roundcube -s xxx.xxx.xxx.xxx -j DROP<\/pre>\n<p>\u0433\u0434\u0435 xxx.xxx.xxx.xxx \u2014 ip \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw enable \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw disable \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 SSH): sudo ufw allow 22 \u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 numbered: sudo ufw status numbered \u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441 numbered 5 sudo ufw delete 5 \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 fail2ban \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 ip \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (jail): fail2ban-client status fail2ban-client status asterisk-security \u0434\u043b\u044f\u2026 <span class=\"read-more\"><a href=\"http:\/\/guwi.ru\/?p=109\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"http:\/\/guwi.ru\/?p=109\" \/>\r\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru\" \/>\r\n<meta property=\"og:description\" content=\"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw enable \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw disable \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 SSH): sudo ufw allow 22 \u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 numbered: sudo ufw status numbered \u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441 numbered 5 sudo ufw delete 5 \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 fail2ban \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 ip \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (jail): fail2ban-client status fail2ban-client status asterisk-security \u0434\u043b\u044f\u2026 \u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;\" \/>\r\n<meta property=\"og:url\" content=\"http:\/\/guwi.ru\/?p=109\" \/>\r\n<meta property=\"og:site_name\" content=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru\" \/>\r\n<meta property=\"article:published_time\" content=\"2018-08-30T08:30:42+00:00\" \/>\r\n<meta name=\"author\" content=\"admin\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/guwi.ru\/?p=109\",\"url\":\"http:\/\/guwi.ru\/?p=109\",\"name\":\"fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru\",\"isPartOf\":{\"@id\":\"http:\/\/guwi.ru\/#website\"},\"datePublished\":\"2018-08-30T08:30:42+00:00\",\"dateModified\":\"2018-08-30T08:30:42+00:00\",\"author\":{\"@id\":\"http:\/\/guwi.ru\/#\/schema\/person\/8389c039a09ca9a7a03b90d05f430762\"},\"breadcrumb\":{\"@id\":\"http:\/\/guwi.ru\/?p=109#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/guwi.ru\/?p=109\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/guwi.ru\/?p=109#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"http:\/\/guwi.ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"fail2ban, ufw, iptables\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/guwi.ru\/#website\",\"url\":\"http:\/\/guwi.ru\/\",\"name\":\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/guwi.ru\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/guwi.ru\/#\/schema\/person\/8389c039a09ca9a7a03b90d05f430762\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"http:\/\/guwi.ru\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/119031a5dc09b470495f25546952bbd6788e8c489add738a2afe18ab63de8267?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/119031a5dc09b470495f25546952bbd6788e8c489add738a2afe18ab63de8267?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/guwi.ru\"],\"url\":\"http:\/\/guwi.ru\/?author=1\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/guwi.ru\/?p=109","og_locale":"ru_RU","og_type":"article","og_title":"fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru","og_description":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw enable \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c UFW ufw disable \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 SSH): sudo ufw allow 22 \u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 numbered: sudo ufw status numbered \u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441 numbered 5 sudo ufw delete 5 \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 fail2ban \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 ip \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0435\u0442\u043e\u043a (jail): fail2ban-client status fail2ban-client status asterisk-security \u0434\u043b\u044f\u2026 \u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;","og_url":"http:\/\/guwi.ru\/?p=109","og_site_name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru","article_published_time":"2018-08-30T08:30:42+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"admin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/guwi.ru\/?p=109","url":"http:\/\/guwi.ru\/?p=109","name":"fail2ban, ufw, iptables - \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru","isPartOf":{"@id":"http:\/\/guwi.ru\/#website"},"datePublished":"2018-08-30T08:30:42+00:00","dateModified":"2018-08-30T08:30:42+00:00","author":{"@id":"http:\/\/guwi.ru\/#\/schema\/person\/8389c039a09ca9a7a03b90d05f430762"},"breadcrumb":{"@id":"http:\/\/guwi.ru\/?p=109#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["http:\/\/guwi.ru\/?p=109"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/guwi.ru\/?p=109#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"http:\/\/guwi.ru\/"},{"@type":"ListItem","position":2,"name":"fail2ban, ufw, iptables"}]},{"@type":"WebSite","@id":"http:\/\/guwi.ru\/#website","url":"http:\/\/guwi.ru\/","name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442\u0430\u043b GUWi.ru","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/guwi.ru\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"http:\/\/guwi.ru\/#\/schema\/person\/8389c039a09ca9a7a03b90d05f430762","name":"admin","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"http:\/\/guwi.ru\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/119031a5dc09b470495f25546952bbd6788e8c489add738a2afe18ab63de8267?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/119031a5dc09b470495f25546952bbd6788e8c489add738a2afe18ab63de8267?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/guwi.ru"],"url":"http:\/\/guwi.ru\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/guwi.ru\/index.php?rest_route=\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/guwi.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/guwi.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/guwi.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/guwi.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":0,"href":"http:\/\/guwi.ru\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"http:\/\/guwi.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/guwi.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/guwi.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}