{"id":92758,"date":"2026-08-11T07:57:00","date_gmt":"2026-08-10T23:57:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/92758.html"},"modified":"2026-08-11T07:57:00","modified_gmt":"2026-08-10T23:57:00","slug":"%e4%b8%ba%e4%ba%86%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e5%85%a8%e5%8a%a0%e5%9b%ba%e9%82%a3%e7%82%b9%e4%ba%8b%ef%bc%8c%e6%88%91%e5%86%99%e4%ba%86%e4%b8%aa%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/92758.html","title":{"rendered":"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c"},"content":{"rendered":"<h3>\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b&#xff0c;\u6211\u5199\u4e86\u4e2a\u811a\u672c<\/h3>\n<h3><\/h3>\n<h3 id=\"toc_2\">\u4e00\u53f0\u65b0\u670d\u52a1\u5668\u4e0a\u7ebf\u540e\u4f1a\u53d1\u751f\u4ec0\u4e48<\/h3>\n<p>\u524d\u51e0\u5929\u4e70\u4e86\u53f0\u96e8\u4e91\u7684\u670d\u52a1\u5668&#xff0c;\u7b2c\u4e8c\u5929\u6253\u5f00\u7ec8\u7aef\u770b\u4e00\u773c\u00a0\/var\/log\/auth.log\u3002<\/p>\n<p>\u4e0a\u7ebf\u4e0d\u5230\u534a\u5c0f\u65f6&#xff0c;\u91cc\u9762\u5df2\u7ecf\u8eba\u4e86\u4e0a\u767e\u6761\u00a0Failed password\u3002IP \u6765\u81ea\u4fc4\u7f57\u65af\u3001\u8d8a\u5357\u3001\u7f8e\u56fd\u3001\u8377\u5170&#xff0c;\u8fd8\u6709\u51e0\u4e2a\u6211\u8fde\u540d\u5b57\u90fd\u53eb\u4e0d\u4e0a\u6765\u7684\u5730\u65b9&#xff08;\u5c31\u662f\u5982\u6b64\u795e\u79d8\u5475\u5475&#xff0c;\u53ef\u4ee5\u62ff\u6765\u8865\u4e60\u5730\u7406\u77e5\u8bc6\u4e86&#xff09;\u3002\u5b83\u4eec\u4e0d\u6311\u65f6\u95f4&#xff0c;\u51cc\u6668\u4e09\u70b9\u4e5f\u5728\u626b&#xff0c;\u5468\u672b\u4e5f\u4e0d\u4f11\u606f\u3002\u5927\u90e8\u5206\u662f\u5b57\u5178\u653b\u51fb&#xff0c;\u6328\u4e2a\u8bd5 root\u3001admin\u3001user\u3001test \u8fd9\u7c7b\u5f31\u53e3\u4ee4\u3002<\/p>\n<p>\u5176\u5b9e\u6211\u89c9\u5f97\u554a&#xff0c;\u4f60\u7684\u670d\u52a1\u5668\u53ea\u8981\u6709\u4e00\u4e2a\u516c\u7f51 IP&#xff0c;\u5c31\u5df2\u7ecf\u5728\u522b\u4eba\u7684\u626b\u63cf\u540d\u5355\u4e0a\u4e86\u3002\u4e0d\u662f\u201c\u53ef\u80fd\u4f1a\u88ab\u653b\u51fb\u201d&#xff0c;\u662f\u201c\u6b63\u5728\u88ab\u653b\u51fb\u201d\u3002<\/p>\n<p>\u6240\u4ee5\u6bcf\u6b21\u65b0\u673a\u5668\u5230\u624b&#xff0c;\u6211\u90fd\u4f1a\u82b1\u5341\u51e0\u5206\u949f\u505a\u4e00\u904d\u5b89\u5168\u52a0\u56fa&#xff1a;\u6539 SSH \u7aef\u53e3\u3001\u5173\u5bc6\u7801\u767b\u5f55\u3001\u88c5 Fail2ban\u3001\u914d\u9632\u706b\u5899\u3001\u8bbe\u5bc6\u7801\u7b56\u7565\u3001\u67e5\u7a7a\u53e3\u4ee4\u8d26\u6237\u2026\u2026<\/p>\n<p>\u8bf4\u96be\u4e0d\u7b97\u96be&#xff0c;\u6bcf\u4e2a\u6b65\u9aa4\u5355\u72ec\u62ce\u51fa\u6765\u4e5f\u5c31\u4e00\u4e24\u884c\u547d\u4ee4\u3002\u4f46\u505a\u591a\u4e86\u5c31\u817b\u4e86\u3002&#xff08;\u5f53\u7136&#xff0c;\u5982\u679c\u4f60\u5b89\u88c5\u4e86\u5b9d\u5854\u9762\u677f\u7b49&#xff0c;\u53ef\u4ee5\u5f88\u8f7b\u677e\u7684\u5728\u9762\u677f\u64cd\u4f5c&#xff0c;\u4f46\u662f\u4e0d\u662f\u6bcf\u4e2a\u670d\u52a1\u5668\u90fd\u4f1a\u5b89\u88c5\u5b9d\u5854\u9762\u677f\u5427\u3002&#xff09;\u6709\u65f6\u5019\u5fd9\u8d77\u6765\u5fd8\u4e86\u505a\u67d0\u4e2a\u6b65\u9aa4&#xff0c;\u8fc7\u51e0\u5929\u60f3\u8d77\u6765\u518d\u53bb\u770b\u65e5\u5fd7&#xff0c;\u5df2\u7ecf\u88ab\u4eba\u626b\u4e86\u51e0\u5929\u4e86\u3002<\/p>\n<p>\u8fd9\u6b21\u8d81\u7740\u6709\u7a7a&#xff0c;\u6211\u628a\u8fd9\u4e9b\u4e8b\u60c5\u6574\u7406\u6210\u4e86\u4e00\u4e2a\u811a\u672c&#xff0c;\u53eb\u00a0LXSecure\u3002\u653e GitHub \u4e0a\u4e86&#xff1a;https:\/\/github.com\/gzy318\/LXSecure<\/p>\n<h3 id=\"toc_7\">1. LXSecure \u662f\u4ec0\u4e48\u3001\u80fd\u505a\u4ec0\u4e48<\/h3>\n<p>\u7b80\u5355\u8bf4\u5c31\u662f\u628a\u5b89\u5168\u52a0\u56fa\u7684\u90a3\u4e9b\u64cd\u4f5c\u6309\u987a\u5e8f\u81ea\u52a8\u5316\u4e86\u3002\u4e00\u5171\u00a014 \u4e2a\u529f\u80fd\u6a21\u5757&#xff0c;\u6bcf\u4e00\u4e2a\u90fd\u53ef\u4ee5\u5355\u72ec\u8fd0\u884c&#xff0c;\u4e5f\u53ef\u4ee5\u4e00\u952e\u5168\u90e8\u8dd1\u5b8c\u3002\u7528\u7684\u65f6\u5019\u6709\u4e00\u4e2a\u83dc\u5355\u754c\u9762&#xff0c;\u9009\u6570\u5b57\u5c31\u884c&#xff0c;\u4e0d\u9700\u8981\u8bb0\u4efb\u4f55\u547d\u4ee4\u3002<\/p>\n<p>\u652f\u6301 Debian\/Ubuntu\u3001CentOS\/RHEL 7&#043;\u3001Rocky Linux\u3001AlmaLinux \u8fd9\u4e9b\u4e3b\u6d41\u53d1\u884c\u7248\u3002<\/p>\n<p>\u5b8c\u6574\u529f\u80fd\u5217\u8868&#xff1a;<\/p>\n<table>\n<tr>\u7f16\u53f7\u529f\u80fd<\/tr>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>\u9000\u51fa<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>\u7cfb\u7edf\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>SSH \u5b89\u5168\u52a0\u56fa<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u9632\u706b\u5899\u914d\u7f6e<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Fail2ban<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u5bc6\u7801\u7b56\u7565<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>\u6587\u4ef6\u6743\u9650\u52a0\u56fa<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>\u5185\u6838\u53c2\u6570&#xff08;\u591a\u573a\u666f&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u5ba1\u8ba1\u65e5\u5fd7<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>\u6076\u610f\u8f6f\u4ef6\u626b\u63cf<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>\u8d26\u6237\u5b89\u5168\u68c0\u67e5<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>AIDE \u6587\u4ef6\u5b8c\u6574\u6027<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>\u751f\u6210\u5b89\u5168\u62a5\u544a<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>\u81ea\u52a8\u5b89\u5168\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>\u5173\u95ed\u4e0d\u5fc5\u8981\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>Lynis \u5b89\u5168\u5ba1\u8ba1<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>\u6267\u884c\u5168\u90e8\u52a0\u56fa<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"toc_12\">2. SSH \u5b89\u5168\u52a0\u56fa<\/h3>\n<p>SSH \u662f\u670d\u52a1\u5668\u7684\u5165\u53e3&#xff0c;\u4e5f\u662f\u88ab\u653b\u51fb\u6700\u591a\u7684\u5165\u53e3\u3002\u811a\u672c\u5728\u8fd9\u4e00\u5757\u505a\u4e86\u51e0\u4ef6\u4e8b\u3002<\/p>\n<p>2.1 \u4fee\u6539 SSH \u7aef\u53e3<\/p>\n<p>22 \u662f\u9ed8\u8ba4\u7aef\u53e3&#xff0c;\u626b\u63cf\u5668\u7b2c\u4e00\u4e2a\u626b\u7684\u5c31\u662f\u5b83\u3002\u811a\u672c\u4f1a\u63d0\u793a\u8f93\u5165\u4e00\u4e2a\u65b0\u7aef\u53e3&#xff0c;\u5efa\u8bae\u7528 10000 \u5230 65535 \u4e4b\u95f4\u7684\u6570\u3002\u522b\u7528 2222\u300110086 \u8fd9\u79cd\u592a\u597d\u731c\u7684\u2014\u2014\u626b\u63cf\u5668\u626b\u5b8c 22 \u4e4b\u540e&#xff0c;\u4f1a\u63a5\u7740\u626b\u4e00\u6279\u5e38\u89c1\u7684\u9ad8\u4f4d\u7aef\u53e3\u3002<\/p>\n<p>\u6539\u7aef\u53e3\u6709\u4e2a\u5751&#xff1a;\u987a\u5e8f\u9519\u4e86\u4f60\u5c31\u628a\u81ea\u5df1\u9501\u5728\u95e8\u5916\u4e86&#xff0c;\u8d3c\u641e\u7b11\u54c8\u54c8&#xff0c;\u7279\u522b\u8be1\u5f02\u3002\u6b63\u786e\u7684\u987a\u5e8f\u662f\u5148\u653e\u884c\u65b0\u7aef\u53e3&#xff0c;\u518d\u6539\u914d\u7f6e&#xff0c;\u6700\u540e\u91cd\u542f\u670d\u52a1\u3002\u811a\u672c\u7684\u5904\u7406\u987a\u5e8f\u662f&#xff1a;\u5148\u68c0\u6d4b\u7cfb\u7edf\u7528\u7684\u662f UFW\u3001Firewalld \u8fd8\u662f\u539f\u751f iptables&#xff0c;\u7528\u5bf9\u5e94\u7684\u547d\u4ee4\u5148\u628a\u65b0\u7aef\u53e3\u653e\u884c\u6389&#xff0c;\u518d\u53bb\u6539\u00a0\/etc\/ssh\/sshd_config&#xff0c;\u6700\u540e\u624d\u91cd\u542f sshd\u3002<\/p>\n<p>2.2 \u7981\u7528 Root \u5bc6\u7801\u767b\u5f55\u3001\u6539\u7528\u5bc6\u94a5<\/p>\n<p>\u6539\u6210\u53ea\u5141\u8bb8\u5bc6\u94a5\u767b\u5f55\u3002\u8fd9\u4e00\u6b65\u7684\u524d\u63d0\u662f\u4f60\u5f97\u6709\u4e00\u5bf9\u5bc6\u94a5\u2014\u2014\u516c\u94a5\u653e\u670d\u52a1\u5668\u4e0a&#xff0c;\u79c1\u94a5\u7559\u672c\u5730\u3002\u811a\u672c\u7ed9\u4e86\u4e24\u4e2a\u9009\u9879&#xff1a;\u53ef\u4ee5\u7c98\u8d34\u81ea\u5df1\u5df2\u6709\u7684\u516c\u94a5&#xff0c;\u4e5f\u53ef\u4ee5\u8ba9\u811a\u672c\u76f4\u63a5\u751f\u6210\u4e00\u5bf9\u65b0\u7684\u3002<\/p>\n<p>2.3 \u751f\u6210 Ed25519 \u5bc6\u94a5\u5bf9<\/p>\n<p>\u5982\u679c\u4f60\u9009\u81ea\u52a8\u751f\u6210&#xff0c;\u811a\u672c\u4f1a\u7528\u00a0ssh-keygen -t ed25519\u00a0\u751f\u6210\u4e00\u5bf9\u5bc6\u94a5\u3002Ed25519 \u662f\u57fa\u4e8e\u692d\u5706\u66f2\u7ebf\u7684\u7b7e\u540d\u7b97\u6cd5&#xff0c;256 \u4f4d\u7684\u5bc6\u94a5\u957f\u5ea6\u5c31\u80fd\u63d0\u4f9b\u548c RSA 4096 \u4f4d\u76f8\u5f53\u7684\u5b89\u5168\u6027&#xff0c;\u800c\u4e14\u751f\u6210\u548c\u9a8c\u8bc1\u901f\u5ea6\u66f4\u5feb\u3002OpenSSH \u4ece 6.5 \u7248\u672c\u5c31\u5f00\u59cb\u652f\u6301\u4e86&#xff0c;2014 \u5e74\u4e4b\u540e\u7684\u7cfb\u7edf\u57fa\u672c\u90fd\u517c\u5bb9\u3002<\/p>\n<p>\u5bc6\u94a5\u751f\u6210\u4e4b\u540e&#xff0c;\u811a\u672c\u4f1a\u628a\u516c\u94a5\u5199\u5165\u00a0\/root\/.ssh\/authorized_keys&#xff0c;\u7136\u540e\u63d0\u793a\u4e0b\u8f7d\u79c1\u94a5\u5e76\u5220\u9664\u670d\u52a1\u5668\u4e0a\u7684\u526f\u672c\u3002\u79c1\u94a5\u4e0d\u5e94\u8be5\u7559\u5728\u670d\u52a1\u5668\u4e0a&#xff0c;\u8fd9\u662f\u57fa\u672c\u7684\u5b89\u5168\u610f\u8bc6\u3002<\/p>\n<p>2.4 \u5176\u4ed6 SSH \u52a0\u56fa\u53c2\u6570<\/p>\n<p>\u811a\u672c\u8fd8\u4f1a\u81ea\u52a8\u914d\u7f6e\u51e0\u4e2a\u989d\u5916\u7684 SSH \u5b89\u5168\u53c2\u6570&#xff1a;<\/p>\n<p>1.MaxAuthTries 3&#xff1a;\u5355\u6b21\u8fde\u63a5\u6700\u591a\u5c1d\u8bd5 3 \u6b21\u8ba4\u8bc1&#xff0c;\u8d85\u8fc7\u5c31\u65ad\u5f00<\/p>\n<p>2.ClientAliveInterval 300&#xff1a;300 \u79d2\u65e0\u6d3b\u52a8\u53d1\u9001\u5fc3\u8df3\u5305\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u5b58\u6d3b<\/p>\n<p>3.ClientAliveCountMax 2&#xff1a;\u5fc3\u8df3\u5305\u8d85\u65f6 2 \u6b21\u5c31\u65ad\u5f00\u8fde\u63a5<\/p>\n<p>4.LogLevel VERBOSE&#xff1a;\u8bb0\u5f55\u66f4\u8be6\u7ec6\u7684\u767b\u5f55\u65e5\u5fd7&#xff0c;\u4fbf\u4e8e\u4e8b\u540e\u8ffd\u6eaf<\/p>\n<p>2.5 \u5b9e\u64cd\u5efa\u8bae<\/p>\n<p>\u4e07\u4e00\u65b0\u7aef\u53e3\u8fde\u4e0d\u4e0a&#xff0c;\u8bf7 VNC \u6551\u63f4\u6a21\u5f0f\u8fdb\u53bb\u4fee\u590d\u2014\u2014\u6240\u6709 VPS \u670d\u52a1\u5546\u90fd\u6709\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n<h3 id=\"toc_17\">3. \u9632\u706b\u5899\u914d\u7f6e&#xff1a;\u81ea\u52a8\u9002\u914d\u3001\u53ea\u7ba1\u653e\u884c\u9700\u8981\u7684\u7aef\u53e3<\/h3>\n<p>\u4e0d\u540c Linux \u53d1\u884c\u7248\u7528\u7684\u9632\u706b\u5899\u5de5\u5177\u4e0d\u4e00\u6837\u2014\u2014Ubuntu \u9ed8\u8ba4\u662f UFW&#xff0c;CentOS 7&#043; \u662f Firewalld&#xff0c;\u8001\u7cfb\u7edf\u53ef\u80fd\u662f\u539f\u751f iptables\u3002\u811a\u672c\u4f1a\u5148\u68c0\u6d4b\u7cfb\u7edf\u91cc\u88c5\u4e86\u4ec0\u4e48&#xff0c;\u7136\u540e\u7528\u5bf9\u5e94\u7684\u65b9\u5f0f\u914d\u7f6e\u3002<\/p>\n<p>\u9ed8\u8ba4\u53ea\u5f00\u653e\u4e09\u4e2a\u7aef\u53e3&#xff1a;SSH \u7aef\u53e3&#xff08;\u5c31\u662f\u4f60\u521a\u6539\u7684\u90a3\u4e2a&#xff09;\u300180 \u548c 443\u3002\u5176\u4ed6\u7aef\u53e3\u5168\u90e8\u5173\u95ed\u3002\u914d\u7f6e\u7684\u65f6\u5019\u811a\u672c\u4f1a\u95ee\u8981\u4e0d\u8981\u989d\u5916\u653e\u884c\u5176\u4ed6\u7aef\u53e3&#xff0c;\u6bd4\u5982 8080\u30013306 \u4e4b\u7c7b\u7684&#xff0c;\u6309\u9700\u6dfb\u52a0\u5c31\u884c\u3002<\/p>\n<p>UFW \u542f\u7528\u4e4b\u524d\u4f1a\u5148\u628a SSH \u7aef\u53e3\u653e\u884c\u6389\u2014\u2014\u5148\u653e\u884c\u518d\u542f\u7528&#xff0c;\u4e0d\u4f1a\u51fa\u73b0\u542f\u7528\u9632\u706b\u5899\u540e\u628a\u81ea\u5df1\u8e22\u51fa\u53bb\u7684\u60c5\u51b5\u3002<\/p>\n<h3 id=\"toc_22\">4. Fail2ban&#xff1a;\u76ef\u7740\u8ba4\u8bc1\u65e5\u5fd7\u5c01 IP<\/h3>\n<p>Fail2ban \u7684\u539f\u7406\u5f88\u7b80\u5355&#xff1a;\u76ef\u7740\u8ba4\u8bc1\u65e5\u5fd7\u770b&#xff0c;\u540c\u4e00\u4e2a IP \u5982\u679c\u5728\u77ed\u65f6\u95f4\u5185\u5931\u8d25\u6b21\u6570\u592a\u591a&#xff0c;\u5c31\u8c03\u7528\u9632\u706b\u5899\u628a\u5b83\u5c01\u6389\u3002\u5b83\u548c\u9632\u706b\u5899\u662f\u914d\u5408\u5173\u7cfb\u2014\u2014\u9632\u706b\u5899\u5b9a\u4e49\u54ea\u4e9b\u7aef\u53e3\u80fd\u8fdb&#xff0c;Fail2ban \u5728\u9632\u706b\u5899\u91cc\u52a8\u6001\u6dfb\u52a0\u9ed1\u540d\u5355\u3002<\/p>\n<p>\u811a\u672c\u914d\u7f6e\u4e86\u4e24\u4e2a jail&#xff1a;<\/p>\n<p>1.sshd&#xff1a;5 \u6b21\u5931\u8d25\u5c01 1 \u5c0f\u65f6<\/p>\n<p>2.sshd-ddos&#xff1a;10 \u6b21\u5931\u8d25\u5c01 2 \u5c0f\u65f6<\/p>\n<p>\u4e3a\u4ec0\u4e48\u8981\u914d\u4e24\u4e2a&#xff1f;\u6709\u4e9b\u653b\u51fb\u662f\u5206\u5e03\u5f0f\u7684&#xff0c;\u5355\u4e2a IP \u5931\u8d25\u6b21\u6570\u4e0d\u591a\u4f46\u6574\u4f53\u6570\u91cf\u5f88\u5927&#xff0c;sshd-ddos \u5c31\u662f\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n<p>Fail2ban \u7684\u914d\u7f6e\u6587\u4ef6\u5728\u00a0\/etc\/fail2ban\/jail.local\u3002\u5982\u679c\u53d1\u73b0\u67d0\u4e2a IP \u6bb5\u6301\u7eed\u5728\u626b&#xff0c;\u53ef\u4ee5\u624b\u52a8\u628a\u00a0bantime\u00a0\u6539\u6210 86400&#xff08;24 \u5c0f\u65f6&#xff09;\u751a\u81f3\u66f4\u957f\u3002\u65e5\u5fd7\u5728\u00a0\/var\/log\/fail2ban.log&#xff0c;\u5c01\u7981\u4e0d\u751f\u6548\u7684\u65f6\u5019\u53bb\u8fd9\u91cc\u770b\u539f\u56e0\u3002\u5e38\u89c1\u95ee\u9898\u662f\u65e5\u5fd7\u8def\u5f84\u4e0d\u5bf9\u2014\u2014\u4e0d\u540c\u53d1\u884c\u7248 sshd \u7684\u65e5\u5fd7\u4f4d\u7f6e\u4e0d\u4e00\u6837&#xff0c;\u9700\u8981\u786e\u8ba4\u00a0jail.local\u00a0\u91cc\u7684\u00a0logpath\u00a0\u8bbe\u7f6e\u6b63\u786e\u3002<\/p>\n<h3 id=\"toc_27\">5. \u5bc6\u7801\u7b56\u7565&#xff1a;\u6539 login.defs \u548c PAM<\/h3>\n<p>\u591a\u7528\u6237\u670d\u52a1\u5668\u4e0a\u5bc6\u7801\u7b56\u7565\u662f\u7ed5\u4e0d\u5f00\u7684\u3002\u811a\u672c\u4f1a\u6539\u00a0\/etc\/login.defs\u00a0\u91cc\u7684\u56db\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p>1.PASS_MAX_DAYS&#xff1a;90 \u5929&#xff0c;\u5bc6\u7801\u5230\u671f\u5fc5\u987b\u6539<\/p>\n<p>2.PASS_MIN_DAYS&#xff1a;2 \u5929&#xff0c;\u4e0d\u80fd\u9891\u7e41\u6539\u56de\u65e7\u5bc6\u7801<\/p>\n<p>3.PASS_MIN_LEN&#xff1a;8 \u4f4d<\/p>\n<p>4.PASS_WARN_AGE&#xff1a;7 \u5929&#xff0c;\u5230\u671f\u524d\u63d0\u9192<\/p>\n<p>\u540c\u65f6\u901a\u8fc7 PAM \u6a21\u5757\u914d\u7f6e\u5bc6\u7801\u590d\u6742\u5ea6\u2014\u2014\u5fc5\u987b\u5305\u542b\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u3002Debian\/Ubuntu \u4e0a\u88c5\u00a0libpam-pwquality&#xff0c;RHEL \u7cfb\u88c5\u00a0libpwquality&#xff0c;\u7136\u540e\u4fee\u6539\u5bf9\u5e94\u7684 PAM \u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h3 id=\"toc_32\">6. \u5185\u6838\u53c2\u6570\u8c03\u4f18&#xff1a;\u4e09\u79cd\u573a\u666f\u81ea\u5df1\u9009<\/h3>\n<p>\u8fd9\u662f LXSecure \u91cc\u6211\u4e2a\u4eba\u89c9\u5f97\u6700\u6709\u610f\u601d\u7684\u90e8\u5206\u3002\u6709\u4e9b\u811a\u672c\u662f\u5957\u7528\u540c\u4e00\u5957\u5185\u6838\u53c2\u6570&#xff0c;\u4e0d\u7ba1\u4ec0\u4e48\u7528\u9014\u3002\u4f46\u8dd1 Web \u670d\u52a1\u548c\u8dd1\u6570\u636e\u5e93\u5bf9\u5185\u6838\u7684\u8981\u6c42\u5b8c\u5168\u4e0d\u4e00\u6837&#xff08;\u6211\u8fd9\u4e2a\u5176\u5b9e\u662f\u4ece\u5b9d\u5854\u9762\u677f\u7684Linux\u5de5\u5177\u7bb1\u63d2\u4ef6\u4e2d\u83b7\u5f97\u7684\u7075\u611f&#xff09;\u3002<\/p>\n<p>\u6211\u5206\u4e86\u4e09\u79cd\u573a\u666f&#xff1a;<\/p>\n<p>6.1 &#x1f6e1;\ufe0f \u5b89\u5168\u4f18\u5148\u2014\u2014\u9002\u7528\u4e8e\u516c\u7f51 Web \u670d\u52a1\u5668\u3001API \u670d\u52a1<\/p>\n<p>\u5f00\u542f\u7684\u5173\u952e\u9632\u62a4&#xff1a;<\/p>\n<p>net.ipv4.tcp_syncookies &#061; 1&#xff1a;\u9632\u5fa1 SYN flood \u653b\u51fb<\/p>\n<p>net.ipv4.conf.all.rp_filter &#061; 1&#xff1a;\u9632\u6b62 IP \u6b3a\u9a97<\/p>\n<p>kernel.dmesg_restrict &#061; 1&#xff1a;\u9650\u5236\u666e\u901a\u7528\u6237\u67e5\u770b\u5185\u6838\u65e5\u5fd7<\/p>\n<p>kernel.kptr_restrict &#061; 2&#xff1a;\u9690\u85cf\u5185\u6838\u6307\u9488\u5730\u5740<\/p>\n<p>kernel.randomize_va_space &#061; 2&#xff1a;\u5f00\u542f ASLR&#xff08;\u5730\u5740\u7a7a\u95f4\u5e03\u5c40\u968f\u673a\u5316&#xff09;<\/p>\n<p>net.ipv4.tcp_syn_retries &#061; 2&#xff1a;\u51cf\u5c11 SYN \u91cd\u8bd5\u6b21\u6570&#xff0c;\u964d\u4f4e\u534a\u8fde\u63a5\u6d88\u8017<\/p>\n<p>net.ipv4.tcp_fin_timeout &#061; 15&#xff1a;\u7f29\u77ed FIN-WAIT \u8d85\u65f6&#xff0c;\u5feb\u901f\u91ca\u653e\u8fde\u63a5<\/p>\n<p>6.2 &#x1f680; \u9ad8\u6027\u80fd\u2014\u2014\u9002\u7528\u4e8e\u6570\u636e\u5e93\u670d\u52a1\u5668\u3001\u6e38\u620f\u670d\u52a1\u5668\u3001\u9ad8\u5e76\u53d1\u573a\u666f<\/p>\n<p>\u4f18\u5316\u7684\u53c2\u6570&#xff1a;<\/p>\n<p>net.core.rmem_max &#061; 16777216&#xff1a;\u63a5\u6536\u7f13\u51b2\u533a\u6269\u5927\u5230 16MB<\/p>\n<p>net.core.wmem_max &#061; 16777216&#xff1a;\u53d1\u9001\u7f13\u51b2\u533a\u6269\u5927\u5230 16MB<\/p>\n<p>fs.file-max &#061; 1000000&#xff1a;\u6700\u5927\u6587\u4ef6\u53e5\u67c4\u6570\u63d0\u5347\u5230 100 \u4e07<\/p>\n<p>vm.swappiness &#061; 10&#xff1a;\u51cf\u5c11\u78c1\u76d8\u4ea4\u6362&#xff0c;\u4f18\u5148\u4f7f\u7528\u5185\u5b58<\/p>\n<p>net.core.somaxconn &#061; 65535&#xff1a;\u589e\u52a0\u76d1\u542c\u961f\u5217\u957f\u5ea6<\/p>\n<p>net.ipv4.tcp_max_syn_backlog &#061; 65535&#xff1a;\u589e\u52a0 SYN \u961f\u5217\u957f\u5ea6<\/p>\n<p>6.3 \u2696\ufe0f \u5747\u8861\u6a21\u5f0f\u2014\u2014\u9002\u7528\u4e8e\u4e2a\u4eba\u5f00\u53d1\u673a\u3001\u901a\u7528\u573a\u666f<\/p>\n<p>\u5728\u5b89\u5168\u548c\u6027\u80fd\u4e4b\u95f4\u53d6\u4e00\u4e2a\u6298\u4e2d\u503c&#xff0c;\u9002\u5408\u5927\u591a\u6570\u60c5\u51b5\u3002\u5404\u9879\u53c2\u6570\u4ecb\u4e8e\u524d\u4e24\u8005\u4e4b\u95f4\u3002<\/p>\n<p>\u8fd9\u4e9b\u53c2\u6570\u4f1a\u5199\u5165\u00a0\/etc\/sysctl.conf&#xff0c;\u7136\u540e\u6267\u884c\u00a0sysctl -p\u00a0\u751f\u6548\u3002\u5982\u679c\u4e0d\u77e5\u9053\u9009\u54ea\u4e2a&#xff0c;\u9009\u5b89\u5168\u4f18\u5148\u5c31\u884c\u2014\u2014\u5927\u90e8\u5206\u573a\u666f\u591f\u7528\u4e86\u3002\u4ee5\u540e\u53d1\u73b0\u6027\u80fd\u4e0d\u591f&#xff0c;\u518d\u5355\u72ec\u8dd1\u8fd9\u4e2a\u6a21\u5757\u5207\u5230\u9ad8\u6027\u80fd\u6a21\u5f0f\u3002<\/p>\n<h3 id=\"toc_37\">7. AIDE&#xff1a;\u7ed9\u7cfb\u7edf\u6587\u4ef6\u62cd\u5f20\u5feb\u7167<\/h3>\n<p>AIDE&#xff08;Advanced Intrusion Detection Environment&#xff09;\u662f\u4e00\u4e2a\u57fa\u4e8e\u4e3b\u673a\u7684\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf&#xff0c;\u7528\u5bc6\u7801\u6821\u9a8c\u548c\u6765\u76d1\u63a7\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u5b8c\u6574\u6027\u3002\u5b83\u505a\u7684\u4e8b\u60c5\u7b80\u5355\u8bf4\u5c31\u662f\u62cd\u7167\u3002<\/p>\n<p>7.1 \u5de5\u4f5c\u539f\u7406<\/p>\n<p>\u7b2c\u4e00\u6b65\u662f\u521d\u59cb\u5316\u6570\u636e\u5e93\u2014\u2014\u626b\u63cf\u7cfb\u7edf\u4e0a\u6307\u5b9a\u7684\u6587\u4ef6\u548c\u76ee\u5f55&#xff0c;\u8bb0\u5f55\u6bcf\u4e2a\u6587\u4ef6\u7684\u54c8\u5e0c\u503c&#xff08;\u652f\u6301 MD5\u3001SHA1\u3001SHA256 \u7b49&#xff09;\u3001\u6743\u9650\u3001\u5927\u5c0f\u3001\u4fee\u6539\u65f6\u95f4\u3001\u8bbf\u95ee\u65f6\u95f4\u3001ctime&#xff0c;\u751f\u6210\u4e00\u4e2a\u57fa\u7ebf\u6570\u636e\u5e93\u3002\u7b2c\u4e8c\u6b65\u662f\u5b9a\u671f\u5bf9\u6bd4\u2014\u2014\u628a\u5f53\u524d\u72b6\u6001\u548c\u57fa\u7ebf\u6570\u636e\u5e93\u505a\u5bf9\u6bd4&#xff0c;\u54ea\u4e2a\u6587\u4ef6\u53d8\u4e86\u3001\u600e\u4e48\u53d8\u7684&#xff0c;\u4e00\u76ee\u4e86\u7136\u3002<\/p>\n<p>7.2 \u5b9e\u9645\u5e94\u7528\u573a\u666f<\/p>\n<p>\u5047\u8bbe\u6709\u4eba\u9ed1\u8fdb\u4e86\u4f60\u7684\u670d\u52a1\u5668&#xff0c;\u66ff\u6362\u4e86\u00a0\/bin\/ps\u00a0\u548c\u00a0\/bin\/netstat&#xff0c;\u8ba9\u4f60\u770b\u4e0d\u5230\u4ed6\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u3002AIDE \u4f1a\u53d1\u73b0\u8fd9\u4e24\u4e2a\u6587\u4ef6\u7684\u54c8\u5e0c\u503c\u548c\u521d\u59cb\u8bb0\u5f55\u4e0d\u4e00\u6837&#xff0c;\u53d1\u90ae\u4ef6\u544a\u8b66\u3002<\/p>\n<p>7.3 \u4f7f\u7528\u6ce8\u610f\u4e8b\u9879<\/p>\n<p>\u9996\u6b21\u521d\u59cb\u5316\u4f1a\u82b1\u51e0\u5206\u949f&#xff0c;\u56e0\u4e3a\u5b83\u8981\u626b\u63cf\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u5efa\u8bae\u5728\u7cfb\u7edf\u521a\u88c5\u597d\u3001\u8fd8\u6ca1\u88c5\u592a\u591a\u8f6f\u4ef6\u7684\u65f6\u5019\u8dd1&#xff0c;\u8fd9\u6837\u57fa\u7ebf\u6570\u636e\u5e93\u6bd4\u8f83\u201c\u5e72\u51c0\u201d\u3002\u5982\u679c\u7b49\u88c5\u4e86\u4e00\u5806\u670d\u52a1\u4e4b\u540e\u518d\u521d\u59cb\u5316&#xff0c;\u6570\u636e\u5e93\u91cc\u4f1a\u5305\u542b\u5927\u91cf\u6b63\u5e38\u6587\u4ef6\u7684\u53d8\u5316&#xff0c;\u6392\u67e5\u8d77\u6765\u66f4\u8d39\u52b2\u3002<\/p>\n<p>AIDE \u53ea\u505a\u6587\u4ef6\u5b8c\u6574\u6027\u68c0\u67e5&#xff0c;\u4e0d\u68c0\u67e5 rootkit \u4e5f\u4e0d\u89e3\u6790\u65e5\u5fd7\u6587\u4ef6\u3002\u811a\u672c\u91cc\u914d\u7f6e\u4e86\u6bcf\u65e5\u81ea\u52a8\u68c0\u67e5&#xff0c;\u7ed3\u679c\u53d1\u5230 root \u90ae\u7bb1\u3002\u5982\u679c\u670d\u52a1\u5668\u4e0a\u914d\u4e86\u90ae\u4ef6\u8f6c\u53d1\u5c31\u80fd\u6536\u5230\u901a\u77e5\u3002<\/p>\n<p>\u521d\u59cb\u5316\u5982\u679c\u5931\u8d25&#xff0c;\u5927\u6982\u7387\u662f\u56e0\u4e3a\u00a0\/etc\/aide\/aide.conf\u00a0\u91cc\u5305\u542b\u4e86\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u3002\u53ef\u4ee5\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\u628a\u90a3\u4e9b\u76ee\u5f55\u6ce8\u91ca\u6389&#xff0c;\u6216\u8005\u624b\u52a8\u521b\u5efa\u7a7a\u76ee\u5f55\u3002\u8fd9\u4e2a\u95ee\u9898\u5728\u6700\u5c0f\u5316\u5b89\u88c5\u7684\u7cfb\u7edf\u4e0a\u6bd4\u8f83\u5e38\u89c1\u3002<\/p>\n<h3 id=\"toc_42\">8. auditd&#xff1a;\u5185\u6838\u7ea7\u7684\u5ba1\u8ba1\u65e5\u5fd7<\/h3>\n<p>auditd \u662f Linux \u5185\u6838\u81ea\u5e26\u7684\u5ba1\u8ba1\u7cfb\u7edf&#xff0c;\u6bd4\u5e94\u7528\u5c42\u65e5\u5fd7\u66f4\u5e95\u5c42\u3001\u66f4\u53ef\u9760\u3002<\/p>\n<p>8.1 auditd \u548c AIDE \u7684\u533a\u522b<\/p>\n<p>\u8fd9\u4e24\u4e2a\u4e1c\u897f\u5bb9\u6613\u641e\u6df7\u3002AIDE \u662f\u4e3b\u52a8\u626b\u63cf&#xff0c;\u5b9a\u671f\u53bb\u68c0\u67e5\u6587\u4ef6\u6709\u6ca1\u6709\u53d8\u5316\u3002auditd \u662f\u88ab\u52a8\u76d1\u542c&#xff0c;\u5185\u6838\u5c42\u9762\u5b9e\u65f6\u8bb0\u5f55\u8c01\u5728\u4ec0\u4e48\u65f6\u5019\u8bbf\u95ee\u4e86\u54ea\u4e9b\u6587\u4ef6\u3001\u6267\u884c\u4e86\u54ea\u4e9b\u547d\u4ee4\u3002<\/p>\n<p>8.2 \u811a\u672c\u914d\u7f6e\u7684\u5ba1\u8ba1\u89c4\u5219<\/p>\n<p>\u811a\u672c\u4f1a\u628a\u89c4\u5219\u5199\u5165\u00a0\/etc\/audit\/rules.d\/lxsecure.rules&#xff0c;\u7528\u00a0augenrules &#8211;load\u00a0\u52a0\u8f7d\u3002\u4e3b\u8981\u76d1\u63a7\u51e0\u7c7b\u4e1c\u897f&#xff1a;<\/p>\n<p>\u5173\u952e\u6587\u4ef6\u7684\u5199\u64cd\u4f5c&#xff1a;<\/p>\n<p>\/etc\/passwd\u3001\/etc\/shadow\u3001\/etc\/group<\/p>\n<p>\/etc\/sudoers<\/p>\n<p>\/etc\/ssh\/sshd_config<\/p>\n<p>\/etc\/crontab<\/p>\n<p>\u654f\u611f\u7cfb\u7edf\u8c03\u7528&#xff1a;<\/p>\n<p>execve&#xff08;\u6267\u884c\u7a0b\u5e8f&#xff09;<\/p>\n<p>openat&#xff08;\u6253\u5f00\u6587\u4ef6&#xff09;<\/p>\n<p>mount&#xff08;\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf&#xff09;<\/p>\n<p>\u7528\u6237\u7ba1\u7406\u547d\u4ee4\u7684\u6267\u884c&#xff1a;<\/p>\n<p>useradd\u3001userdel\u3001usermod<\/p>\n<p>sudo \u64cd\u4f5c\u65e5\u5fd7\u3002<\/p>\n<p>8.3 \u5b9e\u9645\u5e94\u7528\u573a\u666f<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\u3002\u4f60\u53d1\u73b0\u670d\u52a1\u5668\u4e0a\u591a\u4e86\u4e00\u4e2a\u4f60\u4e0d\u77e5\u9053\u7684\u8d26\u6237\u3002\u53bb\u67e5 auditd \u7684\u65e5\u5fd7&#xff0c;\u80fd\u770b\u5230\u8fd9\u4e2a\u8d26\u6237\u662f\u4ec0\u4e48\u65f6\u5019\u521b\u5efa\u7684\u3001\u4ece\u54ea\u4e2a IP \u767b\u5f55\u7684\u3001\u521b\u5efa\u4e4b\u524d\u6267\u884c\u8fc7\u54ea\u4e9b\u547d\u4ee4\u3002\u8fd9\u4e9b\u4fe1\u606f\u80fd\u5e2e\u4f60\u5224\u65ad\u662f\u88ab\u5165\u4fb5\u4e86\u8fd8\u662f\u540c\u4e8b\u8bef\u64cd\u4f5c\u3002<\/p>\n<p>8.4 \u65e5\u5fd7\u7ba1\u7406<\/p>\n<p>auditd \u7684\u65e5\u5fd7\u4f1a\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u3002\u811a\u672c\u91cc\u9650\u5236\u4e86\u65e5\u5fd7\u7f13\u51b2\u533a\u5927\u5c0f&#xff08;-b 8192&#xff09;&#xff0c;\u4f46\u5982\u679c\u7cfb\u7edf\u65e5\u5fd7\u91cf\u5f88\u5927&#xff0c;\u5efa\u8bae\u914d\u7f6e logrotate \u6216\u8005\u5b9a\u671f\u6e05\u7406\u3002\u4e00\u822c\u751f\u4ea7\u73af\u5883\u4f1a\u4fdd\u7559 30 \u5929\u5230 90 \u5929\u7684\u5ba1\u8ba1\u65e5\u5fd7&#xff0c;\u770b\u5408\u89c4\u8981\u6c42\u3002<\/p>\n<h3 id=\"toc_47\">9. rkhunter &#043; chkrootkit&#xff1a;\u626b rootkit<\/h3>\n<p>\u8fd9\u4e24\u4e2a\u90fd\u662f\u7ecf\u5178\u7684 rootkit \u68c0\u6d4b\u5de5\u5177&#xff0c;\u4fa7\u91cd\u70b9\u4e0d\u592a\u4e00\u6837\u3002<\/p>\n<p>9.1 rkhunter&#xff08;Rootkit Hunter&#xff09;<\/p>\n<p>rkhunter \u4e3b\u8981\u9760\u7279\u5f81\u5e93\u5339\u914d&#xff0c;\u68c0\u67e5\u7cfb\u7edf\u4e8c\u8fdb\u5236\u6587\u4ef6\u6709\u6ca1\u6709\u88ab\u7be1\u6539\u3001\u6709\u6ca1\u6709\u53ef\u7591\u7684\u5185\u6838\u6a21\u5757\u3001\/dev\u00a0\u76ee\u5f55\u4e0b\u6709\u6ca1\u6709\u5f02\u5e38\u6587\u4ef6\u3002\u5b83\u6709\u81ea\u5df1\u7684\u6570\u636e\u5e93&#xff0c;\u5b89\u88c5\u4e4b\u540e\u9700\u8981\u5148\u8dd1\u4e00\u6b21\u00a0rkhunter &#8211;propupd\u00a0\u6765\u751f\u6210\u7cfb\u7edf\u521d\u59cb\u72b6\u6001\u3002\u80fd\u68c0\u6d4b\u5927\u7ea6 58 \u4e2a\u5df2\u77e5\u7684 rootkit \u548c\u4e00\u4e9b\u55c5\u63a2\u5668\u548c\u540e\u95e8\u7a0b\u5e8f\u3002<\/p>\n<p>9.2 chkrootkit<\/p>\n<p>chkrootkit \u66f4\u4fa7\u91cd\u4e8e\u68c0\u6d4b\u5df2\u77e5 rootkit \u7684\u7279\u5f81\u2014\u2014\u67d0\u4e2a rootkit \u4f1a\u5728\u7cfb\u7edf\u91cc\u7559\u4e0b\u4ec0\u4e48\u6837\u7684\u6587\u4ef6\u3001\u4ec0\u4e48\u6837\u7684\u8fdb\u7a0b\u3001\u4ec0\u4e48\u6837\u7684\u7f51\u7edc\u8fde\u63a5\u3002\u5b83\u4e0d\u9700\u8981\u521d\u59cb\u5316\u6570\u636e\u5e93&#xff0c;\u76f4\u63a5\u8dd1\u5c31\u884c\u3002<\/p>\n<p>\u4e24\u4e2a\u5de5\u5177\u5404\u6709\u4f18\u7f3a\u70b9&#xff0c;\u642d\u914d\u7740\u7528\u6548\u679c\u66f4\u597d\u3002\u811a\u672c\u4f1a\u628a\u4e24\u4e2a\u90fd\u88c5\u4e0a&#xff0c;\u5e76\u914d\u7f6e rkhunter \u6bcf\u65e5\u81ea\u52a8\u626b\u63cf\u3002<\/p>\n<h3 id=\"toc_52\">10. \u8d26\u6237\u5b89\u5168\u68c0\u67e5&#xff1a;\u7a7a\u53e3\u4ee4\u548c UID 0<\/h3>\n<p>\u8fd9\u4e2a\u6a21\u5757\u53ea\u505a\u68c0\u67e5\u548c\u62a5\u544a&#xff0c;\u4e0d\u505a\u4efb\u4f55\u4fee\u6539\u3002<\/p>\n<p>10.1 \u7a7a\u53e3\u4ee4\u8d26\u6237\u68c0\u67e5<\/p>\n<p>\u67e5\u00a0\/etc\/shadow\u00a0\u91cc\u6709\u6ca1\u6709\u5bc6\u7801\u5b57\u6bb5\u4e3a\u7a7a\u7684\u8d26\u6237\u3002\u7a7a\u53e3\u4ee4\u8d26\u6237\u610f\u5473\u7740\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4e0d\u8f93\u5165\u5bc6\u7801\u767b\u5f55&#xff0c;\u5982\u679c\u5b58\u5728\u8fd9\u6837\u7684\u8d26\u6237&#xff0c;\u811a\u672c\u4f1a\u5217\u51fa\u6765&#xff0c;\u9700\u8981\u624b\u52a8\u5904\u7406\u3002\u6709\u4e9b\u7cfb\u7edf\u9ed8\u8ba4\u4f1a\u6709\u4e00\u4e9b\u65e0\u5bc6\u7801\u7684\u670d\u52a1\u8d26\u6237&#xff0c;\u4f46\u5b83\u4eec\u7684 shell \u662f\u00a0\/sbin\/nologin&#xff0c;\u5b9e\u9645\u4e0a\u4e0d\u80fd\u767b\u5f55&#xff0c;\u8fd9\u79cd\u5c31\u4e0d\u9700\u8981\u7ba1\u3002\u811a\u672c\u53ea\u4f1a\u5217\u51fa\u6765&#xff0c;\u8ba9\u7ba1\u7406\u5458\u81ea\u5df1\u5224\u65ad\u3002<\/p>\n<p>10.2 UID 0 \u5f02\u5e38\u8d26\u6237\u68c0\u67e5<\/p>\n<p>\u67e5\u00a0\/etc\/passwd\u00a0\u91cc\u9664\u4e86 root \u8fd8\u6709\u6ca1\u6709\u5176\u4ed6\u8d26\u6237\u7684 UID \u662f 0\u3002UID 0 \u662f\u8d85\u7ea7\u7528\u6237&#xff0c;\u62e5\u6709\u6700\u9ad8\u6743\u9650\u3002\u5982\u679c\u81ea\u5df1\u6ca1\u6709\u521b\u5efa\u8fc7\u8fd9\u6837\u7684\u8d26\u6237&#xff0c;\u90a3\u53ef\u80fd\u662f\u88ab\u4eba\u7559\u7684\u540e\u95e8\u3002<\/p>\n<h3 id=\"toc_57\">11. \u81ea\u52a8\u5b89\u5168\u66f4\u65b0&#xff1a;\u53ea\u88c5\u5b89\u5168\u66f4\u65b0\u3001\u4e0d\u5168\u91cf\u5347\u7ea7<\/h3>\n<p>\u5168\u91cf\u5347\u7ea7\u5728\u751f\u4ea7\u73af\u5883\u91cc\u662f\u6709\u98ce\u9669\u7684\u2014\u2014\u53ef\u80fd\u4f1a\u5f15\u5165\u4e0d\u517c\u5bb9\u7684\u53d8\u66f4&#xff0c;\u5bfc\u81f4\u670d\u52a1\u51fa\u95ee\u9898\u3002\u4f46\u5b89\u5168\u66f4\u65b0\u4e0d\u6253\u53c8\u4e0d\u884c\u3002<\/p>\n<p>11.1 Debian\/Ubuntu<\/p>\n<p>\u7528\u00a0unattended-upgrades&#xff0c;\u811a\u672c\u914d\u7f6e\u53ea\u5141\u8bb8\u4ece\u00a0*-security\u00a0\u6e90\u5b89\u88c5\u66f4\u65b0&#xff0c;\u5176\u4ed6\u8f6f\u4ef6\u5305\u7248\u672c\u4fdd\u6301\u4e0d\u53d8\u3002\u540c\u65f6\u5f00\u542f\u81ea\u52a8\u4fee\u590d\u4e2d\u65ad\u7684 dpkg\u3001\u81ea\u52a8\u5220\u9664\u4e0d\u518d\u9700\u8981\u7684\u4f9d\u8d56\u3002<\/p>\n<p>11.2 RHEL \u7cfb<\/p>\n<p>CentOS 8&#043;\/RHEL 8&#043; \u7528\u00a0dnf-automatic&#xff0c;CentOS 7 \u7528\u00a0yum-cron&#xff0c;\u542f\u7528\u5b9a\u65f6\u81ea\u52a8\u66f4\u65b0\u3002<\/p>\n<h3 id=\"toc_62\">12. \u5173\u95ed\u4e0d\u5fc5\u8981\u670d\u52a1&#xff1a;\u5c11\u4e00\u4e2a\u670d\u52a1\u5c31\u5c11\u4e00\u4e2a\u6f0f\u6d1e<\/h3>\n<p>\u670d\u52a1\u5668\u4e0a\u6709\u5f88\u591a\u9ed8\u8ba4\u5f00\u542f\u4f46\u6839\u672c\u7528\u4e0d\u4e0a\u7684\u670d\u52a1\u3002\u811a\u672c\u4f1a\u7981\u7528\u4e09\u4e2a&#xff1a;<\/p>\n<p>cups&#xff1a;\u6253\u5370\u670d\u52a1<\/p>\n<p>bluetooth&#xff1a;\u84dd\u7259<\/p>\n<p>avahi-daemon&#xff1a;mDNS \u5e7f\u64ad<\/p>\n<p>\u8fd9\u4e9b\u670d\u52a1\u5728\u684c\u9762\u73af\u5883\u91cc\u6709\u7528&#xff0c;\u4f46\u5728\u670d\u52a1\u5668\u4e0a\u5b8c\u5168\u662f\u591a\u4f59\u7684\u3002\u5c11\u4e00\u4e2a\u8fd0\u884c\u4e2d\u7684\u670d\u52a1&#xff0c;\u5c31\u5c11\u4e00\u4e2a\u53ef\u80fd\u88ab\u5229\u7528\u7684\u6f0f\u6d1e\u5165\u53e3\u3002<\/p>\n<h3 id=\"toc_67\">13. Lynis&#xff1a;\u6df1\u5ea6\u5b89\u5168\u5ba1\u8ba1<\/h3>\n<p>Lynis \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 Unix\/Linux \u5b89\u5168\u5ba1\u8ba1\u5de5\u5177&#xff0c;2007 \u5e74\u5c31\u6709\u4e86&#xff0c;\u6267\u884c\u8d85\u8fc7 2000 \u9879\u914d\u7f6e\u68c0\u67e5\u3002\u68c0\u67e5\u8303\u56f4\u5f88\u5e7f\u2014\u2014\u7cfb\u7edf\u914d\u7f6e\u3001\u8f6f\u4ef6\u5305\u7ba1\u7406\u3001\u7528\u6237\u548c\u7ec4\u3001\u6587\u4ef6\u7cfb\u7edf\u3001\u7f51\u7edc\u914d\u7f6e\u3001SSH\u3001Web \u670d\u52a1\u3001\u6570\u636e\u5e93\u7b49\u7b49\u3002<\/p>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5728\u811a\u672c\u91cc\u662f\u72ec\u7acb\u8fd0\u884c\u7684&#xff0c;\u4e0d\u5305\u542b\u5728\u201c\u5168\u90e8\u52a0\u56fa\u201d\u4e2d\u3002\u56e0\u4e3a Lynis \u5ba1\u8ba1\u4e00\u6b21\u5927\u6982\u9700\u8981 10 \u5230 20 \u5206\u949f&#xff0c;\u9002\u5408\u5355\u72ec\u6267\u884c\u505a\u6df1\u5ea6\u8bc4\u4f30\u3002\u5ba1\u8ba1\u7ed3\u679c\u4f1a\u8f93\u51fa\u5230\u00a0\/var\/log\/lynis_audit.log&#xff0c;\u53ef\u4ee5\u6839\u636e\u62a5\u544a\u91cc\u7684\u5efa\u8bae\u8fdb\u4e00\u6b65\u4f18\u5316\u7cfb\u7edf\u914d\u7f6e\u3002<\/p>\n<h3 id=\"toc_72\">14. \u9632\u9501\u6b7b\u8bbe\u8ba1<\/h3>\n<p>\u5199\u8fd9\u4e2a\u811a\u672c\u7684\u65f6\u5019\u6700\u770b\u91cd\u7684\u4e00\u4e2a\u539f\u5219\u662f&#xff1a;\u522b\u628a\u7528\u6237\u9501\u5728\u95e8\u5916\u3002<\/p>\n<p>\u6539 SSH \u7aef\u53e3\u4e5f\u597d\u3001\u914d\u7f6e\u9632\u706b\u5899\u4e5f\u597d&#xff0c;\u6700\u6015\u7684\u5c31\u662f\u64cd\u4f5c\u5931\u8bef\u5bfc\u81f4 SSH \u8fde\u4e0d\u4e0a\u3002\u7279\u522b\u662f\u5bf9\u4e8e\u65b0\u624b&#xff0c;\u4e00\u65e6\u8fde\u4e0d\u4e0a\u4e86\u5c31\u614c\u4e86\u3002\u6240\u4ee5\u811a\u672c\u91cc\u51e1\u662f\u6709\u53ef\u80fd\u5f71\u54cd SSH \u8fde\u63a5\u7684\u64cd\u4f5c&#xff0c;\u90fd\u6709\u4fdd\u62a4\u63aa\u65bd&#xff1a;<\/p>\n<p>1.\u6539\u7aef\u53e3&#xff1a;\u5148\u653e\u884c\u65b0\u7aef\u53e3 \u2192 \u518d\u6539\u914d\u7f6e \u2192 \u6700\u540e\u91cd\u542f\u670d\u52a1<\/p>\n<p>2.\u914d\u7f6e UFW&#xff1a;\u5148\u7528\u00a0ufw allow\u00a0\u653e\u884c SSH \u7aef\u53e3 \u2192 \u518d\u6267\u884c\u00a0ufw enable<\/p>\n<p>3.\u914d\u7f6e iptables&#xff1a;\u5148\u628a\u9ed8\u8ba4\u7b56\u7565\u8bbe\u6210 ACCEPT \u2192 \u52a0\u5b8c\u6240\u6709\u89c4\u5219 \u2192 \u6700\u540e\u628a\u9ed8\u8ba4\u7b56\u7565\u6539\u6210 DROP<\/p>\n<p>\u8fd9\u6837\u5c31\u7b97\u67d0\u4e2a\u6b65\u9aa4\u51fa\u9519\u4e86&#xff0c;\u5f53\u524d\u8fde\u63a5\u4e5f\u4e0d\u4f1a\u65ad&#xff0c;\u8fd8\u6709\u673a\u4f1a\u8fdb\u53bb\u68c0\u67e5\u548c\u4fee\u590d\u3002<\/p>\n<p>\u5f53\u7136&#xff0c;\u5982\u679c\u7528\u6237\u6539\u5b8c\u7aef\u53e3\u4e4b\u540e\u81ea\u5df1\u624b\u5feb\u628a\u7ec8\u7aef\u5173\u4e86\u7136\u540e\u53d1\u73b0\u65b0\u7aef\u53e3\u8fde\u4e0d\u4e0a\u2026\u2026\u90a3\u811a\u672c\u4e5f\u6551\u4e0d\u4e86\u3002\u8fd9\u79cd\u60c5\u51b5\u53ea\u80fd\u53bb VPS \u540e\u53f0\u7528 VNC\u3002\u4e0d\u8fc7 VNC \u7b97\u662f\u6700\u540e\u7684\u4fdd\u9669&#xff0c;\u6240\u6709 VPS \u670d\u52a1\u5546\u90fd\u6709\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n<h3 id=\"toc_77\">15. \u4e00\u4e9b\u5b9e\u64cd\u4e2d\u8e29\u8fc7\u7684\u5751<\/h3>\n<p>15.1 VPS \u670d\u52a1\u5546\u7684\u989d\u5916\u9632\u706b\u5899<\/p>\n<p>\u6539 SSH \u7aef\u53e3\u4e4b\u524d&#xff0c;\u786e\u8ba4\u4e00\u4e0b VPS \u670d\u52a1\u5546\u6709\u6ca1\u6709\u989d\u5916\u9632\u706b\u5899\u3002\u5f88\u591a\u670d\u52a1\u5546\u5728\u63a7\u5236\u9762\u677f\u91cc\u8fd8\u6709\u4e00\u4e2a\u72ec\u7acb\u7684\u9632\u706b\u5899\u6216\u8005\u5b89\u5168\u7ec4&#xff0c;\u90a3\u4e2a\u4e0d\u5f52\u7cfb\u7edf\u7ba1\u2014\u2014\u6539\u4e86\u7cfb\u7edf\u7aef\u53e3\u4f46\u9762\u677f\u9632\u706b\u5899\u6ca1\u653e\u884c\u7684\u8bdd\u7167\u6837\u8fde\u4e0d\u4e0a\u3002<\/p>\n<p>15.2 Fail2ban \u65e5\u5fd7\u8def\u5f84\u95ee\u9898<\/p>\n<p>Fail2ban \u7684\u65e5\u5fd7\u5728\u00a0\/var\/log\/fail2ban.log&#xff0c;\u5982\u679c\u53d1\u73b0\u5c01\u7981\u4e0d\u751f\u6548&#xff0c;\u53bb\u8fd9\u91cc\u770b\u3002\u5e38\u89c1\u539f\u56e0\u662f\u65e5\u5fd7\u8def\u5f84\u4e0d\u5bf9&#xff0c;\u4e0d\u540c\u53d1\u884c\u7248 sshd \u7684\u65e5\u5fd7\u4f4d\u7f6e\u4e0d\u4e00\u6837&#xff0c;\u9700\u8981\u786e\u8ba4\u00a0jail.local\u00a0\u91cc\u7684\u00a0logpath\u00a0\u8bbe\u7f6e\u6b63\u786e\u3002<\/p>\n<p>15.3 AIDE \u521d\u59cb\u5316\u5931\u8d25<\/p>\n<p>AIDE \u9996\u6b21\u521d\u59cb\u5316\u5982\u679c\u5931\u8d25&#xff0c;\u5927\u6982\u7387\u662f\u56e0\u4e3a\u00a0\/etc\/aide\/aide.conf\u00a0\u91cc\u5305\u542b\u4e86\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u3002\u53ef\u4ee5\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\u628a\u90a3\u4e9b\u76ee\u5f55\u6ce8\u91ca\u6389&#xff0c;\u6216\u8005\u624b\u52a8\u521b\u5efa\u7a7a\u76ee\u5f55\u3002\u8fd9\u4e2a\u95ee\u9898\u5728\u6700\u5c0f\u5316\u5b89\u88c5\u7684\u7cfb\u7edf\u4e0a\u6bd4\u8f83\u5e38\u89c1\u3002<\/p>\n<p>15.4 auditd \u65e5\u5fd7\u81a8\u80c0<\/p>\n<p>auditd \u7684\u65e5\u5fd7\u4f1a\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u3002\u811a\u672c\u91cc\u9650\u5236\u4e86\u65e5\u5fd7\u7f13\u51b2\u533a\u5927\u5c0f&#xff0c;\u4f46\u5982\u679c\u7cfb\u7edf\u65e5\u5fd7\u91cf\u5f88\u5927&#xff0c;\u5efa\u8bae\u914d\u7f6e logrotate \u6216\u8005\u5b9a\u671f\u6e05\u7406\u3002\u4e00\u822c\u751f\u4ea7\u73af\u5883\u4f1a\u4fdd\u7559 30 \u5929\u5230 90 \u5929\u7684\u5ba1\u8ba1\u65e5\u5fd7&#xff0c;\u770b\u5408\u89c4\u8981\u6c42\u3002<\/p>\n<h3 id=\"toc_82\">16. \u600e\u4e48\u7528<\/h3>\n<p>\u4ea4\u4e92\u5f0f\u7ba1\u7406&#xff08;\u5b89\u88c5\/\u5378\u8f7d\/\u72b6\u6001\/\u8fd0\u884c\/\u66f4\u65b0&#xff09;<\/p>\n<p>bash &lt;(curl \\\\-sSL https:\/\/raw.githubusercontent.com\/gzy318\/LXSecure\/main\/install.sh)<\/p>\n<p>\u76f4\u63a5\u8fd0\u884c&#xff08;\u4e0d\u5b89\u88c5&#xff09;<\/p>\n<p>wget https:\/\/raw.githubusercontent.com\/gzy318\/LXSecure\/main\/lxsecure.sh<br \/>\nchmod &#043;x lxsecure.sh<br \/>\nsudo .\/lxsecure.sh <\/p>\n<p>\u8dd1\u5b8c\u4e4b\u540e\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u4e00\u4efd\u5b89\u5168\u62a5\u544a&#xff0c;\u5e26\u65f6\u95f4\u6233&#xff0c;\u91cc\u9762\u6c47\u603b\u4e86\u6240\u6709\u52a0\u56fa\u7684\u7ed3\u679c&#xff0c;\u53ef\u4ee5\u5b58\u7740\u5f52\u6863\u3002<\/p>\n<h3 id=\"toc_87\">17.\u4f7f\u7528\u622a\u56fe<\/h3>\n<p>\u5b89\u88c5\u811a\u672c&#xff1a;<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"144\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810235659-6a7a654b9a613.png\" width=\"265\" \/><\/p>\n<p>\u4e3b\u811a\u672c&#xff1a;<\/p>\n<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"432\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810235659-6a7a654bd79ad.png\" width=\"476\" \/><\/p>\n<h3 id=\"toc_92\">18. \u9879\u76ee\u5730\u5740<\/h3>\n<p>GitHub&#xff1a;https:\/\/github.com\/gzy318\/LXSecure<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b&#xff0c;\u6211\u5199\u4e86\u4e2a\u811a\u672c \u4e00\u53f0\u65b0\u670d\u52a1\u5668\u4e0a\u7ebf\u540e\u4f1a\u53d1\u751f\u4ec0\u4e48<br \/>\n\u524d\u51e0\u5929\u4e70\u4e86\u53f0\u96e8\u4e91\u7684\u670d\u52a1\u5668&#xff0c;\u7b2c\u4e8c\u5929\u6253\u5f00\u7ec8\u7aef\u770b\u4e00\u773c\u00a0\/var\/log\/auth.log\u3002<br \/>\n\u4e0a\u7ebf\u4e0d\u5230\u534a\u5c0f\u65f6&#xff0c;\u91cc\u9762\u5df2\u7ecf\u8eba\u4e86\u4e0a\u767e\u6761\u00a0Failed password\u3002IP \u6765\u81ea\u4fc4\u7f57\u65af\u3001\u8d8a\u5357\u3001\u7f8e\u56fd\u3001\u8377\u5170&#xff0c;\u8fd8\u6709\u51e0\u4e2a\u6211\u8fde\u540d\u5b57\u90fd\u53eb\u4e0d\u4e0a\u6765\u7684\u5730\u65b9&#xff08;\u5c31\u662f\u5982\u6b64\u795e\u79d8\u5475\u5475&#xff0c;\u53ef\u4ee5\u62ff\u6765\u8865\u4e60\u5730\u7406\u77e5\u8bc6\u4e86&#xff09;\u3002\u5b83\u4eec<\/p>\n","protected":false},"author":2,"featured_media":92756,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9137,92,61,43,305,44],"topic":[],"class_list":["post-92758","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-atomgit","tag-github","tag-61","tag-43","tag-305","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/92758.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b&#xff0c;\u6211\u5199\u4e86\u4e2a\u811a\u672c \u4e00\u53f0\u65b0\u670d\u52a1\u5668\u4e0a\u7ebf\u540e\u4f1a\u53d1\u751f\u4ec0\u4e48 \u524d\u51e0\u5929\u4e70\u4e86\u53f0\u96e8\u4e91\u7684\u670d\u52a1\u5668&#xff0c;\u7b2c\u4e8c\u5929\u6253\u5f00\u7ec8\u7aef\u770b\u4e00\u773c\u00a0\/var\/log\/auth.log\u3002 \u4e0a\u7ebf\u4e0d\u5230\u534a\u5c0f\u65f6&#xff0c;\u91cc\u9762\u5df2\u7ecf\u8eba\u4e86\u4e0a\u767e\u6761\u00a0Failed password\u3002IP \u6765\u81ea\u4fc4\u7f57\u65af\u3001\u8d8a\u5357\u3001\u7f8e\u56fd\u3001\u8377\u5170&#xff0c;\u8fd8\u6709\u51e0\u4e2a\u6211\u8fde\u540d\u5b57\u90fd\u53eb\u4e0d\u4e0a\u6765\u7684\u5730\u65b9&#xff08;\u5c31\u662f\u5982\u6b64\u795e\u79d8\u5475\u5475&#xff0c;\u53ef\u4ee5\u62ff\u6765\u8865\u4e60\u5730\u7406\u77e5\u8bc6\u4e86&#xff09;\u3002\u5b83\u4eec\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/92758.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-10T23:57:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810235659-6a7a654b9a613.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/92758.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/92758.html\",\"name\":\"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-10T23:57:00+00:00\",\"dateModified\":\"2026-08-10T23:57:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/92758.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/92758.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/92758.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/92758.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u672c\u6587\u6765\u81ea\u6211\u7684\u4e2a\u4eba\u535a\u5ba2&#xff1a;\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b&#xff0c;\u6211\u5199\u4e86\u4e2a\u811a\u672c \u4e00\u53f0\u65b0\u670d\u52a1\u5668\u4e0a\u7ebf\u540e\u4f1a\u53d1\u751f\u4ec0\u4e48 \u524d\u51e0\u5929\u4e70\u4e86\u53f0\u96e8\u4e91\u7684\u670d\u52a1\u5668&#xff0c;\u7b2c\u4e8c\u5929\u6253\u5f00\u7ec8\u7aef\u770b\u4e00\u773c\u00a0\/var\/log\/auth.log\u3002 \u4e0a\u7ebf\u4e0d\u5230\u534a\u5c0f\u65f6&#xff0c;\u91cc\u9762\u5df2\u7ecf\u8eba\u4e86\u4e0a\u767e\u6761\u00a0Failed password\u3002IP \u6765\u81ea\u4fc4\u7f57\u65af\u3001\u8d8a\u5357\u3001\u7f8e\u56fd\u3001\u8377\u5170&#xff0c;\u8fd8\u6709\u51e0\u4e2a\u6211\u8fde\u540d\u5b57\u90fd\u53eb\u4e0d\u4e0a\u6765\u7684\u5730\u65b9&#xff08;\u5c31\u662f\u5982\u6b64\u795e\u79d8\u5475\u5475&#xff0c;\u53ef\u4ee5\u62ff\u6765\u8865\u4e60\u5730\u7406\u77e5\u8bc6\u4e86&#xff09;\u3002\u5b83\u4eec","og_url":"https:\/\/www.wsisp.com\/helps\/92758.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-10T23:57:00+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810235659-6a7a654b9a613.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/92758.html","url":"https:\/\/www.wsisp.com\/helps\/92758.html","name":"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-10T23:57:00+00:00","dateModified":"2026-08-10T23:57:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/92758.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/92758.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/92758.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e3a\u4e86\u670d\u52a1\u5668\u5b89\u5168\u52a0\u56fa\u90a3\u70b9\u4e8b\uff0c\u6211\u5199\u4e86\u4e2a\u811a\u672c"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/92758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=92758"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/92758\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/92756"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=92758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=92758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=92758"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=92758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}