{"id":855,"date":"2026-11-09T18:19:49","date_gmt":"2026-11-09T10:19:49","guid":{"rendered":"https:\/\/blog.ofuyuan.com\/?p=855"},"modified":"2026-11-09T18:21:07","modified_gmt":"2026-11-09T10:21:07","slug":"svrguard-005-fail2ban","status":"publish","type":"post","link":"https:\/\/blog.ofuyuan.com\/?p=855","title":{"rendered":"[05][\u4e3b\u6a5f\u9632\u79a6-SvrGuard] SvrGuard \u8ddf fail2ban \u5dee\u5225"},"content":{"rendered":"<p><img decoding=\"async\" style=\"width: 100%; max-width: 100%; height: auto; display: block; margin: 1em 0;\" src=\"https:\/\/blog.ofuyuan.com\/wp-content\/uploads\/2026\/11\/hero-2.jpg\" alt=\"SvrGuard \u8ddf fail2ban \u5dee\u5225\uff1a\u4e00\u53f0\u96fb\u8166\u770b\u65e5\u8a8c\uff0c\u4e00\u53f0\u770b\u591a\u53f0\u4e3b\u6a5f\u7684\u4e3b\u63a7\u53f0\" \/><\/p>\n<p>\u6700\u8fd1\u5e7e\u4f4d\u670b\u53cb\u554f\u6211\uff0cSvrGuard \u4e0d\u5c31\u662f fail2ban \u7684 GUI \u7248\u672c\u55ce\uff1f<\/p>\n<p>\u8001\u5be6\u8aaa\u9084\u771f\u4e0d\u662f\uff0c\u5169\u8005\u90fd\u662f\u8b80 log \u4f86\u627e\u653b\u64ca\uff0c\u4f46\u958b\u767c SvrGuard \u7684\u6700\u5927\u539f\u56e0\u9084\u662f\u6211\u61f6\uff0c\u624b\u4e0a\u6709\u591a\u53f0\u806f\u5408\u570b\u4e3b\u6a5f\uff0cUbuntu \/ Debian \/ NAS \/ Mac\uff0c\u5982\u679c\u6211\u8981\u7528 fail2ban \u9084\u771f\u7684\u6709\u4e9b\u9ebb\u7169\uff0c\u7d22\u6027\u5c31\u81ea\u5df1\u4f86\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/fail2ban\/fail2ban\" target=\"_blank\" rel=\"noopener\">fail2ban<\/a> \u662f\u958b\u6e90\u7684\u8001\u724c\u5de5\u5177\uff1a\u8b80\u65e5\u8a8c\u3001\u7528\u6b63\u898f\u5f0f\u6bd4\u5c0d\u5931\u6557\u7d00\u9304\uff0c\u540c\u4e00\u500b\u4f4d\u5740\u5728\u6642\u9593\u5167\u5931\u6557\u5230\u9580\u6abb\uff08\u9810\u8a2d 10 \u5206\u9418 5 \u6b21\uff09\u5c31\u547c\u53eb\u9632\u706b\u7246\u5c01\u6389\u3002\u5b83\u5167\u5efa\u7d04\u4e00\u767e\u500b\u670d\u52d9\u7684\u6bd4\u5c0d\u898f\u5247\uff0c\u5c01\u9396\u53ef\u4ee5\u63a5 iptables\u3001nftables\u3001pf\u3001Cloudflare\uff0cLinux\u3001BSD\u3001macOS \u90fd\u80fd\u8dd1\u3002\u53ea\u60f3\u64cb SSH \u66b4\u529b\u7834\u89e3\uff0c\u5b83\u5f88\u5920\u7528\u3002<\/p>\n<p>\u5169\u8005\u5728\u5206\u6790 log \u4e0a\u6700\u5927\u7684\u5dee\u7570\u662f\uff0cSvrGuard \u5728\u7db2\u7ad9\u65e5\u8a8c\u4e0a\u6703\u5206\u6790\u8108\u7d61\uff0c\u8a02\u51fa\u4e0d\u540c\u898f\u5247\u53bb\u5224\u65b7\u6709\u5a01\u8105\u7684 IP\uff0c\u800c fail2ban \u662f\u76f4\u63a5\u6bd4\u5c0d\u65e5\u8a8c\u662f\u5426\u5931\u6557\u6216\u6709\u554f\u984c\u3002<\/p>\n<p>\u4f46 fail2ban \u7684\u65e5\u8a8c\u6db5\u84cb\u9762\u8f03\u5ee3\uff0c\u7db2\u7ad9\u3001SSH\u3001xrdp\u3001\u90f5\u4ef6\u2026\u2026\u7b49\uff0c\u800c SvrGuard \u6db5\u84cb SSH\u3001\u7db2\u7ad9\uff08Apache\u3001nginx \u7684\u5b58\u53d6\u8207\u932f\u8aa4\u65e5\u8a8c\uff09\u3001\u9060\u7aef\u684c\u9762\uff08xrdp\uff09\u548c Mac \u7684\u87a2\u5e55\u5171\u4eab\uff0c\u7a2e\u985e\u5c11\u4e00\u4e9b\uff0c\u4e0d\u904e\u6703\u91dd\u5c0d\u7279\u5b9a\u7684\u7db2\u7ad9\u67b6\u69cb\u4f86\u5206\u6790\uff0c\u5982 WordPress \u7b49\u3002<\/p>\n<h2>\u56de\u5230\u90a3\u53f0\u88ab\u99ed\u7684\u6a5f\u5668<\/h2>\n<p><a href=\"https:\/\/blog.ofuyuan.com\/?p=811\">\u4e0a\u6b21\u88ab\u99ed\u90a3\u53f0 Ubuntu<\/a>\uff0c\u5bc6\u78bc\u88ab\u8a66\u4e86\u4e09\u5343\u591a\u6b21\uff0c\u6700\u5f8c\u88ab\u731c\u4e2d\u3002\u9019\u4e09\u5343\u591a\u6b21\u8a18\u5728 <code>lastb<\/code> \u8b80\u7684\u767b\u5165\u5931\u6557\u7d00\u9304\u88e1\uff0c\u4f46 auth.log \u88e1\u627e\u4e0d\u5230\u4efb\u4f55 sshd \u7684\u7d00\u9304\u3002<\/p>\n<p>fail2ban \u9760\u65e5\u8a8c\u6bd4\u5c0d\uff0c\u800c\u90a3\u53f0\u6a5f\u5668\u4e0a\u672c\u8a72\u8a18\u4e0b sshd \u7684\u5730\u65b9\u662f\u7a7a\u7684\uff0c\u5b83\u5c31\u6c92\u6709\u6771\u897f\u53ef\u4ee5\u6bd4\u5c0d\u3002<\/p>\n<p>SvrGuard \u6703\u62ff\u767b\u5165\u7d00\u9304\u548c SSH \u65e5\u8a8c\u4e92\u76f8\u5c0d\u7167\uff1a\u5982\u679c\u767b\u5165\u7d00\u9304\u986f\u793a\u6709\u4eba\u767b\u5165\u904e\uff0c\u800c SSH \u65e5\u8a8c\u6c92\u6709\u767c\u73fe\u7d00\u9304\uff0c\u5c31\u6703\u767c\u901a\u77e5\u3002<\/p>\n<h2>\u5bc6\u78bc\u88ab\u731c\u4e2d\u4e4b\u5f8c<\/h2>\n<p>\u64cb\u66b4\u529b\u7834\u89e3\u8655\u7406\u7684\u662f\u9580\u53e3\u3002\u5bc6\u78bc\u4e00\u65e6\u88ab\u731c\u4e2d\uff0c\u554f\u984c\u5c31\u8b8a\u6210\u5c4b\u88e1\u6709\u6c92\u6709\u4eba\uff1a\u6709\u6c92\u6709\u88ab\u639b ld.so.preload\u3001\u6709\u6c92\u6709\u5f9e\u66ab\u5b58\u76ee\u9304\u8dd1\u8d77\u4f86\u7684\u7a0b\u5f0f\u3001cron \u548c systemd \u6709\u6c92\u6709\u88ab\u52a0\u6599\u3001sudoers \u6709\u6c92\u6709\u591a\u4e00\u884c\u514d\u5bc6\u78bc\u7684 root\u3002<\/p>\n<p>AI \u7576\u9053\u4e0b\uff0c\u5f88\u96e3\u55ae\u7528\u65e5\u8a8c\u4f86\u8655\u7406\uff0c\u5982\u679c\u53ef\u4ee5\u4e3b\u52d5\u5b9a\u6642\u53bb\u6aa2\u67e5\u7570\u5e38\u57f7\u884c\u7a0b\u5f0f\u3001\u7570\u5e38\u6a94\u6848\u7b49\uff0c\u90a3\u5c31\u6709\u4e86\u4e3b\u52d5\u6aa2\u67e5\u7684\u529f\u80fd\uff0c\u6a5f\u5668\u7684\u5b89\u5168\u4e5f\u591a\u4e86\u4e00\u5c64\u4fdd\u969c\uff0c\u8d77\u78bc\u77e5\u9053\u4ec0\u9ebc\u6642\u5019\u8a72\u6253\u6389\u91cd\u7df4\u3002\u6240\u4ee5\u6211\u628a\u4e0a\u6b21 Ubuntu \u7684\u6aa2\u67e5\u6e05\u55ae\u4e5f\u505a\u9032 SvrGuard\uff0c\u5b9a\u671f\u6aa2\u67e5\uff0c\u5f37\u5316\u9632\u79a6\u80fd\u529b\u3002<\/p>\n<h2>\u5169\u8005\u6bd4\u8f03<\/h2>\n<p><img decoding=\"async\" style=\"width: 100%; max-width: 100%; height: auto; display: block; margin: 1em 0;\" src=\"https:\/\/blog.ofuyuan.com\/wp-content\/uploads\/2026\/11\/compare_table.png\" alt=\"SvrGuard \u8ddf fail2ban \u5dee\u5225\u6bd4\u8f03\u8868\uff1a\u5224\u65b7\u65b9\u5f0f\u3001\u652f\u63f4\u7684\u65e5\u8a8c\u3001\u88ab\u99ed\u5f8c\u3001CLI \u6aa2\u67e5\u3001\u591a\u53f0\u6a5f\u5668\u3001\u64cd\u4f5c\" \/><\/p>\n<h2>\u9078\u54ea\u4e00\u500b<\/h2>\n<p>\u9752\u83dc\u863f\u8514\u559c\u597d\u5404\u4e0d\u540c\uff0cfail2ban \u724c\u5b50\u8001\uff0c\u53ef\u4ee5\u652f\u63f4\u7684\u65e5\u8a8c\u4e5f\u591a\uff0c\u800c SvrGuard \u591a\u4e86\u5165\u4fb5\u6aa2\u67e5\u53ca\u591a\u53f0\u7ba1\u7406\uff0c\u5c31\u770b\u9700\u6c42\u56c9~<\/p>\n<hr \/>\n<p>\u672c\u7cfb\u5217\u6587\u7ae0\uff1a<a href=\"https:\/\/blog.ofuyuan.com\/?cat=78\">\u4e3b\u6a5f\u9632\u79a6\u7cfb\u7d71-SvrGuard<\/a>\u3002\u60f3\u4e86\u89e3\u66f4\u591a SvrGuard\uff0c\u6b61\u8fce\u9020\u8a2a <a href=\"https:\/\/svrguard.ofuyuan.com\/zh\/\" target=\"_blank\" rel=\"noopener\">SvrGuard \u5b98\u65b9\u7db2\u7ad9<\/a>\uff0c\u6709\u554f\u984c\u6216\u60f3\u6cd5\u6b61\u8fce\u5230 <a href=\"https:\/\/forum.ofuyuan.com\/\" target=\"_blank\" rel=\"noopener\">SvrGuard \u8a0e\u8ad6\u5340<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5df2\u7d93\u6709 fail2ban \u4e86\uff0c\u70ba\u4ec0\u9ebc\u9084\u8981 SvrGuard\uff1ffail2ban \u64cb\u9580\u53e3\u4e00\u76f4\u8a66\u5bc6\u78bc\u7684\u4eba\uff1bSvrGuard \u53e6\u5916\u7ba1\u65e5\u8a8c\u8b80\u4e0d\u5230\u7684\u6642\u5019\u3001\u5df2\u7d93\u9032\u4f86\u4e86\u600e\u9ebc\u8fa6\u3001\u591a\u53f0\u600e\u9ebc\u7ba1\u3002 <a href=\"https:\/\/blog.ofuyuan.com\/?p=855\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":854,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[107,108,79,109,110,87],"class_list":["post-855","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category--svrguard","tag-fail2ban","tag-ssh-","tag-svrguard","tag-109","tag-110","tag-87"],"_links":{"self":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=855"}],"version-history":[{"count":4,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/855\/revisions"}],"predecessor-version":[{"id":861,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/855\/revisions\/861"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/media\/854"}],"wp:attachment":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}