{"id":189,"date":"2024-02-24T18:20:12","date_gmt":"2024-02-24T10:20:12","guid":{"rendered":"https:\/\/669082.xyz\/?p=189"},"modified":"2024-02-24T18:20:12","modified_gmt":"2024-02-24T10:20:12","slug":"fail2ban%e8%bf%87%e6%bb%a4%e9%98%b2%e6%ad%a2basic-auth%e7%88%86%e7%a0%b4","status":"publish","type":"post","link":"https:\/\/669082.xyz\/index.php\/2024\/02\/24\/fail2ban%e8%bf%87%e6%bb%a4%e9%98%b2%e6%ad%a2basic-auth%e7%88%86%e7%a0%b4\/","title":{"rendered":"fail2ban\u8fc7\u6ee4\u9632\u6b62basic auth\u7206\u7834"},"content":{"rendered":"<pre><code class=\"language-shell\">#\u7f16\u8f91\u6587\u4ef6\nvi \/etc\/fail2ban\/jail.loca\n\n#\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\n[DEFAULT]\nignoreip = 127.0.0.1\/8\nbantime  = 600\nfindtime = 300\nmaxretry = 3\nbanaction = firewallcmd-ipset\naction = %(action_mwl)s\n\n[nginx-http-auth]\nenabled = true\nfilter = nginx-http-auth\nport     = http,https\nlogpath = \/www\/wwwlogs\/*error.log\n\n#\u91cd\u542ffail2ban\nsystemctl restart fail2ban\n\n#\u89c2\u5bdf\nfail2ban-client status nginx-http-auth<\/code><\/pre>\n<p>\u4ee5\u4e0a\u7528\u5f97\u89c4\u5219\u662f\u81ea\u5e26\u7684\uff0c\u5982\u679c\u6ca1\u6709\u81ea\u5e26\u89c4\u5219<br \/>\n\u8bf7\u53c2\u8003<br \/>\n<a href=\"http:\/\/wiki.fnil.net\/index.php?title=Fail2ban%E9%85%8D%E7%BD%AE\">http:\/\/wiki.fnil.net\/index.php?title=Fail2ban%E9%85%8D%E7%BD%AE<\/a><br \/>\n<a href=\"https:\/\/serverfault.com\/questions\/421046\/how-to-limit-nginx-auth-basic-re-tries\">https:\/\/serverfault.com\/questions\/421046\/how-to-limit-nginx-auth-basic-re-tries<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#\u7f16\u8f91\u6587\u4ef6 vi \/etc\/fail2ban\/jail.loca #\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9 [DEFAULT] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":1,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/189\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}