{"id":192,"date":"2026-02-06T11:03:22","date_gmt":"2026-02-06T03:03:22","guid":{"rendered":"https:\/\/xueluo.site\/?p=192"},"modified":"2026-03-24T10:18:19","modified_gmt":"2026-03-24T02:18:19","slug":"fail2ban%ef%bc%9a%e8%87%aa%e5%8a%a8%e5%b1%8f%e8%94%bd%e6%81%b6%e6%84%8f%e6%94%bb%e5%87%bb%e7%9a%84%e5%85%a5%e4%be%b5%e9%98%b2%e5%be%a1%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/xueluo.site\/?p=192","title":{"rendered":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d"},"content":{"rendered":"\n<p>\u547c&#8230;\u521a\u63a5\u624b\u4e00\u53f0\u66b4\u9732\u5728\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u770b\u7740\u8ba4\u8bc1\u65e5\u5fd7\u91cc\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u201cFailed password\u201d\uff0c\u662f\u4e0d\u662f\u89c9\u5f97\u5934\u76ae\u53d1\u9ebb\uff1f\u522b\u614c\uff0c\u4eca\u5929\u7ed9\u4f60\u4ecb\u7ecd\u4e00\u4f4d\u670d\u52a1\u5668\u5b89\u5168\u754c\u7684\u201c\u8001\u5c06\u201d\u2014\u2014Fail2ban\u3002\u5b83\u4e0d\u662f\u90a3\u79cd\u754c\u9762\u9177\u70ab\u7684\u65b0\u6f6e\u5de5\u5177\uff0c\u4f46\u7edd\u5bf9\u662f\u7ecf\u4e45\u8010\u7528\u7684\u201c\u5b9a\u6d77\u795e\u9488\u201d\u3002\u7b80\u5355\u8bf4\uff0c<strong>\u5b83\u5c31\u662f\u90a3\u4e2a\u9ed8\u9ed8\u5b88\u62a4\u5728\u540e\u53f0\uff0c\u81ea\u52a8\u628a\u4e0d\u6000\u597d\u610f\u7684\u8bbf\u5ba2\u8e22\u51fa\u95e8\u5916\u7684\u667a\u80fd\u4fdd\u5b89<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5f53\u4e4b\u65e0\u6127\u7684\u670d\u52a1\u5668\u201c\u95e8\u795e\u201d<\/h3>\n\n\n\n<p>Fail2ban\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u3001\u5f00\u6e90\u7684\u670d\u52a1\u7aef\u5165\u4fb5\u9632\u5fa1\u6846\u67b6\uff0c\u4e13\u95e8\u7528\u6765<strong>\u76d1\u63a7\u65e5\u5fd7\u6587\u4ef6\uff0c\u81ea\u52a8\u5c01\u7981\u6709\u6076\u610f\u884c\u4e3a\u7684IP\u5730\u5740<\/strong>\u3002\u5b83\u89e3\u51b3\u7684\u6838\u5fc3\u95ee\u9898\u5c31\u662f\u201c\u81ea\u52a8\u5316\u5b89\u5168\u9632\u62a4\u201d\u2014\u2014\u4f60\u4e0d\u53ef\u80fd24\u5c0f\u65f6\u76ef\u7740\u65e5\u5fd7\uff0c\u4f46Fail2ban\u53ef\u4ee5\u3002<\/p>\n\n\n\n<p>\u60f3\u8c61\u4e00\u4e0b\uff0c\u6709\u4e2a\u5bb6\u4f19\u62ff\u7740\u4e07\u80fd\u94a5\u5319\uff0c\u6bcf\u79d2\u5c1d\u8bd5\u5f00\u4f60\u5bb6\u95e8\u9501100\u6b21\u3002Fail2ban\u7684\u4f5c\u7528\u5c31\u662f\uff1a\u8bc6\u522b\u51fa\u8fd9\u4e2a\u201c\u75af\u72c2\u8bd5\u9519\u201d\u7684\u884c\u4e3a\uff0c\u7136\u540e\u9ed8\u9ed8\u5730\u5728\u95e8\u53e3\u8bbe\u7f6e\u4e00\u9053\u4e34\u65f6\u5c4f\u969c\uff0c\u8ba9\u4ed6\u4e00\u6bb5\u65f6\u95f4\u5185\u518d\u4e5f\u65e0\u6cd5\u9760\u8fd1\u3002\u5b83\u7279\u522b\u9002\u5408<strong>\u4efb\u4f55\u8fd0\u884c\u5728\u516c\u7f51\u4e0a\u7684Linux\/Unix\u670d\u52a1\u5668<\/strong>\uff0c\u5c24\u5176\u662f\u90a3\u4e9b\u5f00\u653e\u4e86SSH\u3001FTP\u3001Web\u670d\u52a1\u7684\u673a\u5668\u3002\u6700\u5927\u7684\u4eae\u70b9\uff1f<strong>\u914d\u7f6e\u7075\u6d3b\u3001\u8d44\u6e90\u5360\u7528\u6781\u4f4e\uff0c\u4e00\u4e2a\u547d\u4ee4\u5c31\u80fd\u8ba9\u653b\u51fb\u8005\u201c\u65e0\u529f\u800c\u8fd4\u201d<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u6838\u5fc3\u5de5\u4f5c\u539f\u7406\u89e3\u6790<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ud83d\udd0d \u5b9e\u65f6\u65e5\u5fd7\u76d1\u63a7<\/strong>\uff1a\u6301\u7eed\u626b\u63cf\u7cfb\u7edf\u65e5\u5fd7\uff08\u5982\/var\/log\/auth.log, \/var\/log\/apache\/error_log\uff09\uff0c\u5bfb\u627e\u5931\u8d25\u5c1d\u8bd5\u7684\u6a21\u5f0f<\/li>\n\n\n\n<li><strong>\ud83d\udcca \u667a\u80fd\u89c4\u5219\u5339\u914d<\/strong>\uff1a\u901a\u8fc7\u9884\u5b9a\u4e49\u6216\u81ea\u5b9a\u4e49\u7684\u201c\u8fc7\u6ee4\u5668\u201d\uff08Filter\uff09\uff0c\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u7cbe\u51c6\u8bc6\u522b\u653b\u51fb\u884c\u4e3a\uff0c\u6bd4\u5982\u591a\u6b21SSH\u5bc6\u7801\u9519\u8bef<\/li>\n\n\n\n<li><strong>\u23f1\ufe0f \u65f6\u95f4\u7a97\u53e3\u7edf\u8ba1<\/strong>\uff1a\u5728\u8bbe\u5b9a\u7684\u201c\u67e5\u627e\u65f6\u95f4\u201d\u7a97\u53e3\u5185\uff08\u598210\u5206\u949f\uff09\uff0c\u7edf\u8ba1\u540c\u4e00IP\u7684\u5931\u8d25\u6b21\u6570<\/li>\n\n\n\n<li><strong>\ud83d\udeab \u81ea\u52a8\u6267\u884c\u5c01\u7981<\/strong>\uff1a\u5f53\u5931\u8d25\u6b21\u6570\u8d85\u8fc7\u201c\u6700\u5927\u91cd\u8bd5\u201d\u9608\u503c\uff0c\u8c03\u7528\u201c\u52a8\u4f5c\u201d\u811a\u672c\uff08\u5982iptables\u6216firewalld\u89c4\u5219\uff09\u5c01\u7981\u8be5IP\u4e00\u6bb5\u201c\u5c01\u7981\u65f6\u95f4\u201d<\/li>\n\n\n\n<li><strong>\ud83d\udd13 \u5b9a\u65f6\u81ea\u52a8\u89e3\u5c01<\/strong>\uff1a\u5230\u8fbe\u5c01\u7981\u65f6\u95f4\u540e\u81ea\u52a8\u79fb\u9664\u5c01\u7981\u89c4\u5219\uff0c\u907f\u514d\u6c38\u4e45\u6027\u8bef\u4f24\uff0c\u4e5f\u652f\u6301\u624b\u52a8\u63d0\u524d\u89e3\u5c01<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u5982\u4f55\u8bf7\u6765\u8fd9\u4f4d\u201c\u4fdd\u5b89\u201d\uff1f<\/h3>\n\n\n\n<p><strong>\u9879\u76ee\u4e3b\u9875<\/strong>\uff1a<a href=\"https:\/\/github.com\/fail2ban\/fail2ban\">https:\/\/github.com\/fail2ban\/fail2ban<\/a><\/p>\n\n\n\n<p><strong>\u5b89\u88c5\u65b9\u5f0f<\/strong>\uff1a\u901a\u8fc7\u7cfb\u7edf\u5305\u7ba1\u7406\u5668\u4e00\u952e\u5b89\u88c5\uff0c\u4e3b\u6d41\u53d1\u884c\u7248\u90fd\u652f\u6301<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Ubuntu\/Debian\nsudo apt update &amp;&amp; sudo apt install fail2ban\n\n# CentOS\/RHEL\nsudo yum install epel-release\nsudo yum install fail2ban\n\n# Fedora\nsudo dnf install fail2ban<\/code><\/pre>\n\n\n\n<p><strong>\u7248\u672c\u8bf4\u660e<\/strong>\uff1a\u91c7\u7528GPLv2\u5f00\u6e90\u8bb8\u53ef\u8bc1\uff0c\u5b8c\u5168\u514d\u8d39\u3002\u6838\u5fc3\u7531Python\u7f16\u5199\uff0c\u4e0e\u7cfb\u7edf\u9632\u706b\u5899\uff08iptables, nftables, firewalld\u7b49\uff09\u6df1\u5ea6\u96c6\u6210\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. 10\u5206\u949f\u5feb\u901f\u90e8\u7f72\u6307\u5357<\/h3>\n\n\n\n<p>\u5b89\u88c5\u540e\uff0cFail2ban\u901a\u5e38\u4f1a\u81ea\u52a8\u8fd0\u884c\u3002\u4f46\u8ba9\u5b83\u771f\u6b63\u53d1\u6325\u4f5c\u7528\uff0c\u4f60\u9700\u8981\u4e00\u4e2a\u7b80\u5355\u7684\u914d\u7f6e\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u590d\u5236\u9ed8\u8ba4\u914d\u7f6e<\/strong>\uff08\u907f\u514d\u76f4\u63a5\u4fee\u6539\u539f\u6587\u4ef6\uff0c\u65b9\u4fbf\u5347\u7ea7\uff09\uff1a <code>sudo cp \/etc\/fail2ban\/jail.conf \/etc\/fail2ban\/jail.local<\/code><\/li>\n\n\n\n<li><strong>\u7f16\u8f91\u672c\u5730\u914d\u7f6e\u6587\u4ef6<\/strong>\uff0c\u8bbe\u7f6e\u57fa\u672c\u53c2\u6570\uff1a <code>sudo nano \/etc\/fail2ban\/jail.local<\/code>\u627e\u5230 <code>[DEFAULT]<\/code>\u6bb5\uff0c\u8c03\u6574\u51e0\u4e2a\u5173\u952e\u53c2\u6570\uff1a <code>[DEFAULT] # \u5c01\u7981\u65f6\u95f4\uff1a1\u5c0f\u65f6 bantime = 3600 # \u68c0\u6d4b\u65f6\u95f4\u7a97\u53e3\uff1a10\u5206\u949f findtime = 600 # \u6700\u5927\u5931\u8d25\u6b21\u6570\uff1a5\u6b21 maxretry = 5 # \u4f60\u7684\u670d\u52a1\u5668IP\uff08\u767d\u540d\u5355\uff0c\u9632\u6b62\u81ea\u5df1\u628a\u81ea\u5df1\u9501\u4e86\uff09 ignoreip = 127.0.0.1\/8 \u4f60\u7684\u516c\u7f51IP<\/code><\/li>\n\n\n\n<li><strong>\u542f\u7528\u5e76\u542f\u52a8\u4fdd\u62a4<\/strong>\uff08\u6bd4\u5982\u4fdd\u62a4SSH\uff09\uff1a \u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u786e\u4fdd\u5982\u4e0bSSH\u76d1\u72f1\u662f\u542f\u7528\u7684\uff1a <code>[sshd] enabled = true # \u5982\u679c\u4f60\u6539\u4e86SSH\u7aef\u53e3\uff08\u59822222\uff09\uff0c\u4e00\u5b9a\u8981\u52a0\u4e0b\u9762\u8fd9\u884c\uff01 port = ssh,2222<\/code><\/li>\n\n\n\n<li><strong>\u91cd\u542f\u670d\u52a1\uff0c\u8ba9\u914d\u7f6e\u751f\u6548<\/strong>\uff1a <code>sudo systemctl restart fail2ban sudo systemctl enable fail2ban # \u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/code><\/li>\n\n\n\n<li><strong>\u68c0\u67e5\u72b6\u6001<\/strong>\uff0c\u770b\u770b\u4fdd\u5b89\u662f\u5426\u4e0a\u5c97\uff1a <code>sudo fail2ban-client status sudo fail2ban-client status sshd # \u67e5\u770bSSH\u76d1\u72f1\u8be6\u60c5<\/code><\/li>\n<\/ol>\n\n\n\n<p>\u641e\u5b9a\uff01\u73b0\u5728\u5982\u679c\u6709\u4eba\u7528\u9519\u8bef\u5bc6\u7801\u8bd5\u4f60\u7684SSH\u8d85\u8fc75\u6b21\uff0c\u4ed6\u5c31\u4f1a\u88ab\u81ea\u52a8\u5c01\u79811\u5c0f\u65f6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u5178\u578b\u9632\u5fa1\u573a\u666f\u5b9e\u6218<\/h3>\n\n\n\n<p><strong>\ud83d\udee1\ufe0f \u573a\u666f\u4e00\uff1a\u9632\u5fa1SSH\u66b4\u529b\u7834\u89e3<\/strong>\u2014\u2014\u8fd9\u662fFail2ban\u7684\u201c\u62db\u724c\u52a8\u4f5c\u201d\u300299%\u7684\u670d\u52a1\u5668\u653b\u51fb\u59cb\u4e8eSSH\u7aef\u53e3\u626b\u63cf\u3002\u542f\u7528\u540e\uff0c\u653b\u51fb\u811a\u672c\u7684\u5bc6\u7801\u5b57\u5178\u8fd8\u6ca1\u8dd1\u5b8c\u5341\u5206\u4e4b\u4e00\uff0cIP\u5c31\u5df2\u7ecf\u88ab\u62c9\u9ed1\u4e86\uff0c\u65e5\u5fd7\u77ac\u95f4\u6e05\u51c0\u3002<\/p>\n\n\n\n<p><strong>\ud83c\udf10 \u573a\u666f\u4e8c\uff1a\u4fdd\u62a4Web\u5e94\u7528<\/strong>\uff08\u5982WordPress, Nginx\uff09\u3002Fail2ban\u53ef\u4ee5\u76d1\u63a7Nginx\u7684\u8bbf\u95ee\u65e5\u5fd7\uff0c\u5982\u679c\u53d1\u73b0\u67d0\u4e2aIP\u5728\u77ed\u65f6\u95f4\u5185\u75af\u72c2\u8bf7\u6c42\u4e0d\u5b58\u5728\u7684\u9875\u9762\uff08\u626b\u63cf\u6f0f\u6d1e\uff09\uff0c\u6216\u5bf9\u767b\u5f55\u9875\u9762\u8fdb\u884c\u649e\u5e93\uff0c\u76f4\u63a5\u5c01\u7981\uff0c\u4e3a\u4f60\u7684\u7f51\u7ad9\u62b5\u6321\u5927\u90e8\u5206\u81ea\u52a8\u5316\u5de5\u5177\u7684\u653b\u51fb\u3002<\/p>\n\n\n\n<p><strong>\ud83d\udce7 \u573a\u666f\u4e09\uff1a\u90ae\u4ef6\u670d\u52a1\uff08Postfix\/Dovecot\uff09\u9632\u62a4<\/strong>\u3002\u9632\u6b62\u653b\u51fb\u8005\u66b4\u529b\u7834\u89e3\u90ae\u7bb1\u5bc6\u7801\u3002\u914d\u7f6e\u76f8\u5e94\u7684jail\u540e\uff0c\u4efb\u4f55\u5bf9SMTP\u6216IMAP\u670d\u52a1\u7684\u9891\u7e41\u5931\u8d25\u767b\u5f55\u5c1d\u8bd5\u90fd\u4f1a\u88ab\u679c\u65ad\u62e6\u622a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. \u6211\u7684\u4f7f\u7528\u5fc3\u5f97\u4e0e\u5fe0\u544a<\/h3>\n\n\n\n<p><strong>\u4f18\u52bf\u7279\u70b9<\/strong>\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6548\u679c\u7acb\u7aff\u89c1\u5f71<\/strong>\uff1a\u914d\u7f6e\u597d\u540e\uff0c\u7cfb\u7edf\u65e5\u5fd7\u91cc\u7684\u5931\u8d25\u767b\u5f55\u5c1d\u8bd5\u4f1a\u5448\u65ad\u5d16\u5f0f\u4e0b\u964d\u3002<\/li>\n\n\n\n<li><strong>\u8d44\u6e90\u6d88\u8017\u6781\u4f4e<\/strong>\uff1a\u4f5c\u4e3a\u5b88\u62a4\u8fdb\u7a0b\u8fd0\u884c\uff0c\u51e0\u4e4e\u4e0d\u5360CPU\u548c\u5185\u5b58\u3002<\/li>\n\n\n\n<li><strong>\u914d\u7f6e\u6781\u5176\u7075\u6d3b<\/strong>\uff1a\u4f60\u53ef\u4ee5\u4e3a\u4efb\u4f55\u6709\u65e5\u5fd7\u7684\u670d\u52a1\uff08\u751a\u81f3\u81ea\u5b9a\u4e49\u5e94\u7528\uff09\u7f16\u5199\u8fc7\u6ee4\u5668\u548c\u52a8\u4f5c\u89c4\u5219\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u6700\u9002\u7528\u7684\u4eba\u7fa4<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u670d\u52a1\u5668\u8fd0\u7ef4\u65b0\u624b<\/strong>\uff1a\u63d0\u4f9b\u5f00\u7bb1\u5373\u7528\u7684\u57fa\u7840\u9632\u62a4\uff0c\u5fc3\u7406\u5b89\u5168\u611f\u500d\u589e\u3002<\/li>\n\n\n\n<li><strong>\u4e2a\u4eba\u7ad9\u957f\/VPS\u7528\u6237<\/strong>\uff1a\u4ee5\u6700\u5c0f\u6210\u672c\u62b5\u5fa1\u6700\u5e38\u89c1\u7684\u81ea\u52a8\u5316\u7f51\u7edc\u653b\u51fb\u3002<\/li>\n\n\n\n<li><strong>\u9ad8\u7ea7\u8fd0\u7ef4\u5de5\u7a0b\u5e08<\/strong>\uff1a\u4f5c\u4e3a\u4e00\u4e2a\u53ef\u9760\u7684\u57fa\u7840\u9632\u62a4\u5c42\uff0c\u5728\u6b64\u57fa\u7840\u4e0a\u6784\u5efa\u66f4\u590d\u6742\u7684\u5b89\u5168\u4f53\u7cfb\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u5fc5\u987b\u6ce8\u610f\u7684\u51e0\u70b9<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u522b\u628a\u81ea\u5df1\u5173\u5916\u9762<\/strong>\uff1a\u914d\u7f6e\u65f6\u52a1\u5fc5\u5728 <code>ignoreip<\/code>\u4e2d\u52a0\u5165\u4f60\u5e38\u7528\u7684\u56fa\u5b9a\u516c\u7f51IP\uff01<\/li>\n\n\n\n<li><strong>\u4e0d\u662f\u4e07\u80fd\u76d4\u7532<\/strong>\uff1a\u5b83\u4e3b\u8981\u9632\u201c\u66b4\u529b\u7834\u89e3\u201d\uff0c\u5bf9\u4e8e\u590d\u6742\u7684\u6f0f\u6d1e\u5229\u7528\u6216\u5355\u6b21\u653b\u51fb\uff08\u5982\u5f31\u5bc6\u7801\uff09\u65e0\u6548\uff0c\u5f3a\u5bc6\u7801\u4ecd\u662f\u57fa\u7840\u3002<\/li>\n\n\n\n<li><strong>\u7559\u610f\u4f9d\u8d56\u5173\u7cfb<\/strong>\uff1a\u5b83\u7684\u5c01\u7981\u52a8\u4f5c\u4f9d\u8d56\u4e8e\u7cfb\u7edf\u9632\u706b\u5899\uff08\u5982iptables\uff09\uff0c\u786e\u4fdd\u9632\u706b\u5899\u6b63\u5e38\u5de5\u4f5c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u603b\u7684\u6765\u8bf4\uff0cFail2ban\u5c31\u50cf\u670d\u52a1\u5668\u7684\u201c\u57fa\u7840\u514d\u75ab\u7cfb\u7edf\u201d\u3002\u5b83\u4e0d\u4f1a\u8ba9\u4f60\u7684\u670d\u52a1\u5668\u5200\u67aa\u4e0d\u5165\uff0c\u4f46\u80fd\u6709\u6548\u8fc7\u6ee4\u638999%\u7684\u201c\u7ec6\u83cc\u201d\u548c\u201c\u75c5\u6bd2\u201d\uff08\u81ea\u52a8\u5316\u811a\u672c\u653b\u51fb\uff09\u3002\u82b1\u534a\u5c0f\u65f6\u914d\u7f6e\uff0c\u6362\u4e00\u4efd\u957f\u4e45\u5b89\u5fc3\uff0c\u8fd9\u7b14\u201c\u65f6\u95f4\u6295\u8d44\u201d\u7684\u56de\u62a5\u7387\uff0c\u7b80\u76f4\u592a\u9ad8\u4e86\u3002\u8d76\u7d27\u7ed9\u4f60\u5bb6\u7684\u670d\u52a1\u5668\u4e5f\u8bf7\u4e0a\u8fd9\u4f4d\u5fe0\u5b9e\u53ef\u9760\u7684\u4fdd\u5b89\u961f\u957f\u5427\uff01<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u547c&#8230;\u521a\u63a5\u624b\u4e00\u53f0\u66b4\u9732\u5728\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u770b\u7740\u8ba4\u8bc1\u65e5\u5fd7\u91cc\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u201cFailed password\u201d\uff0c\u662f\u4e0d &#8230; <a title=\"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d\" class=\"read-more\" href=\"https:\/\/xueluo.site\/?p=192\" aria-label=\"\u9605\u8bfb Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357<\/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=\"https:\/\/xueluo.site\/?p=192\" \/>\r\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357\" \/>\r\n<meta property=\"og:description\" content=\"\u547c&#8230;\u521a\u63a5\u624b\u4e00\u53f0\u66b4\u9732\u5728\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u770b\u7740\u8ba4\u8bc1\u65e5\u5fd7\u91cc\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u201cFailed password\u201d\uff0c\u662f\u4e0d ... \u9605\u8bfb\u66f4\u591a\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/xueluo.site\/?p=192\" \/>\r\n<meta property=\"og:site_name\" content=\"\u6548\u7387\u8f6f\u4ef6\u6307\u5357\" \/>\r\n<meta property=\"article:published_time\" content=\"2026-02-06T03:03:22+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2026-03-24T02:18:19+00:00\" \/>\r\n<meta name=\"author\" content=\"\u9e7f\u6251\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9e7f\u6251\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/xueluo.site\/?p=192#article\",\"isPartOf\":{\"@id\":\"https:\/\/xueluo.site\/?p=192\"},\"author\":{\"name\":\"\u9e7f\u6251\",\"@id\":\"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503\"},\"headline\":\"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d\",\"datePublished\":\"2026-02-06T03:03:22+00:00\",\"dateModified\":\"2026-03-24T02:18:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/xueluo.site\/?p=192\"},\"wordCount\":73,\"commentCount\":0,\"articleSection\":[\"\u5b89\u5168\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/xueluo.site\/?p=192#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xueluo.site\/?p=192\",\"url\":\"https:\/\/xueluo.site\/?p=192\",\"name\":\"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357\",\"isPartOf\":{\"@id\":\"https:\/\/xueluo.site\/#website\"},\"datePublished\":\"2026-02-06T03:03:22+00:00\",\"dateModified\":\"2026-03-24T02:18:19+00:00\",\"author\":{\"@id\":\"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503\"},\"breadcrumb\":{\"@id\":\"https:\/\/xueluo.site\/?p=192#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xueluo.site\/?p=192\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xueluo.site\/?p=192#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/xueluo.site\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xueluo.site\/#website\",\"url\":\"https:\/\/xueluo.site\/\",\"name\":\"\u6548\u7387\u8f6f\u4ef6\u6307\u5357\",\"description\":\"\u6bcf\u5929\u63a8\u8350\u4e00\u6b3e\u8ba9\u4f60\u4e8b\u534a\u529f\u500d\u7684\u795e\u5668\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/xueluo.site\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503\",\"name\":\"\u9e7f\u6251\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g\",\"caption\":\"\u9e7f\u6251\"},\"sameAs\":[\"http:\/\/xueluo.site\"],\"url\":\"https:\/\/xueluo.site\/?author=1\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357","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":"https:\/\/xueluo.site\/?p=192","og_locale":"zh_CN","og_type":"article","og_title":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357","og_description":"\u547c&#8230;\u521a\u63a5\u624b\u4e00\u53f0\u66b4\u9732\u5728\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u770b\u7740\u8ba4\u8bc1\u65e5\u5fd7\u91cc\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u201cFailed password\u201d\uff0c\u662f\u4e0d ... \u9605\u8bfb\u66f4\u591a","og_url":"https:\/\/xueluo.site\/?p=192","og_site_name":"\u6548\u7387\u8f6f\u4ef6\u6307\u5357","article_published_time":"2026-02-06T03:03:22+00:00","article_modified_time":"2026-03-24T02:18:19+00:00","author":"\u9e7f\u6251","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9e7f\u6251","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/xueluo.site\/?p=192#article","isPartOf":{"@id":"https:\/\/xueluo.site\/?p=192"},"author":{"name":"\u9e7f\u6251","@id":"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503"},"headline":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d","datePublished":"2026-02-06T03:03:22+00:00","dateModified":"2026-03-24T02:18:19+00:00","mainEntityOfPage":{"@id":"https:\/\/xueluo.site\/?p=192"},"wordCount":73,"commentCount":0,"articleSection":["\u5b89\u5168"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/xueluo.site\/?p=192#respond"]}]},{"@type":"WebPage","@id":"https:\/\/xueluo.site\/?p=192","url":"https:\/\/xueluo.site\/?p=192","name":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d - \u6548\u7387\u8f6f\u4ef6\u6307\u5357","isPartOf":{"@id":"https:\/\/xueluo.site\/#website"},"datePublished":"2026-02-06T03:03:22+00:00","dateModified":"2026-03-24T02:18:19+00:00","author":{"@id":"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503"},"breadcrumb":{"@id":"https:\/\/xueluo.site\/?p=192#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xueluo.site\/?p=192"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/xueluo.site\/?p=192#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/xueluo.site\/"},{"@type":"ListItem","position":2,"name":"Fail2ban\uff1a\u4f60\u7684\u670d\u52a1\u5668\u4fdd\u5b89\u961f\u957f\uff0c\u8ba9\u66b4\u529b\u7834\u89e3\u201c\u6709\u6765\u65e0\u56de\u201d"}]},{"@type":"WebSite","@id":"https:\/\/xueluo.site\/#website","url":"https:\/\/xueluo.site\/","name":"\u6548\u7387\u8f6f\u4ef6\u6307\u5357","description":"\u6bcf\u5929\u63a8\u8350\u4e00\u6b3e\u8ba9\u4f60\u4e8b\u534a\u529f\u500d\u7684\u795e\u5668","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xueluo.site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/xueluo.site\/#\/schema\/person\/17c51de5f9f6f227f829fc298adfd503","name":"\u9e7f\u6251","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/047ecef96ed5d241dfbb3fb429b531ad28d9966ebdef391f4b363b5bacd16453?s=96&d=mm&r=g","caption":"\u9e7f\u6251"},"sameAs":["http:\/\/xueluo.site"],"url":"https:\/\/xueluo.site\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xueluo.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=192"}],"version-history":[{"count":2,"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/xueluo.site\/index.php?rest_route=\/wp\/v2\/posts\/192\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/xueluo.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xueluo.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xueluo.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}