{"id":365,"date":"2011-08-11T15:48:04","date_gmt":"2011-08-11T15:48:04","guid":{"rendered":""},"modified":"2013-02-07T12:10:28","modified_gmt":"2013-02-07T04:10:28","slug":"fail2ban%e9%98%bb%e6%ad%a2vsftpd%e6%9a%b4%e5%8a%9b%e6%94%bb%e5%87%bb%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%af%b9%e7%ad%96","status":"publish","type":"post","link":"https:\/\/ybzx.vip\/wp\/?p=365","title":{"rendered":"fail2ban\u963b\u6b62vsftpd\u66b4\u529b\u653b\u51fb\u5931\u8d25\u7684\u5bf9\u7b56"},"content":{"rendered":"<p>Fail2ban is failing to ban VSFTPD bruteforce:<\/p>\n<p>In my case with VSFTPD, with unresolvable DNS names from \/var\/log\/secure:<\/p>\n<p><strong>Scenario:<\/strong> VSFTP configuration is set for PAM authentication, using xferlog in standard format. Fail2ban for vsftpd is watching \/var\/log\/secure<\/p>\n<p><strong>Problem:<\/strong> PAM sends failed login information to \/var\/log\/secure, but the remote server&#8217;s IP address has been replaced by a DNS name. Resulting DNS name does not resolve or does not resolve correctly, thus fail2ban is unable to ban the IP address.<\/p>\n<p><strong>Fix:<\/strong> Configure VSFTP for &#8220;dual_log_enable=YES&#8221;, and have fail2ban watch \/var\/log\/vsftpd.log instead. This log file shows the incoming ip address instead of the DNS name.<\/p>\n<p>[ <strong>update<\/strong>: you also need to adde&#8217;use_localtime=YES&#8217; to config file of VSFTPD. otherwise, above trick not working. it took me hours to solve the problem. :(]<\/p>\n<p><a href=\"http:\/\/www.fail2ban.org\/wiki\/index.php\/Fail2ban:Community_Portal#Fail2ban_is_failing_to_ban_VSFTPD_bruteforce\" target=\"_blank\">Source and more tips.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fail2ban is failing to ban VSFTPD bruteforce: In my cas &hellip; <a href=\"https:\/\/ybzx.vip\/wp\/?p=365\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">fail2ban\u963b\u6b62vsftpd\u66b4\u529b\u653b\u51fb\u5931\u8d25\u7684\u5bf9\u7b56<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[79,96,78],"class_list":["post-365","post","type-post","status-publish","format-standard","hentry","category-network","tag-centos","tag-fail2ban","tag-linux"],"_links":{"self":[{"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=\/wp\/v2\/posts\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=365"}],"version-history":[{"count":0,"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=\/wp\/v2\/posts\/365\/revisions"}],"wp:attachment":[{"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ybzx.vip\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}