{"id":34707,"date":"2025-04-30T10:46:15","date_gmt":"2025-04-30T02:46:15","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/34707.html"},"modified":"2025-04-30T10:46:15","modified_gmt":"2025-04-30T02:46:15","slug":"%e5%a0%a1%e5%9e%92%e6%9c%ba-%e8%b7%b3%e6%9d%bf%e6%9c%ba%e8%bf%9e%e6%8e%a5%e5%86%85%e7%bd%91%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/34707.html","title":{"rendered":"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668"},"content":{"rendered":"<h2 style=\"background-color:transparent\">\u5821\u5792\u673a\u4ecb\u7ecd<\/h2>\n<p>\u5821\u5792\u673a&#xff08;Jump Server&#xff09;\u53c8\u79f0\u8df3\u697c\u673a&#xff0c;\u662f\u4e00\u79cd\u4f4d\u4e8e\u5185\u90e8\u7f51\u7edc\u548c\u5916\u90e8\u7f51\u7edc\u4e4b\u95f4\u7684\u670d\u52a1\u5668&#xff0c;\u7528\u4e8e\u7ba1\u7406\u548c\u63a7\u5236\u5bf9\u5185\u90e8\u7f51\u7edc\u8d44\u6e90\u7684\u8bbf\u95ee\u3002\u5821\u5792\u673a\u5728\u7f51\u7edc\u4e2d\u626e\u6f14\u7740\u4ee5\u4e0b\u91cd\u8981\u89d2\u8272&#xff1a;<\/p>\n<li>\n<p>\u8bbf\u95ee\u63a7\u5236&#xff1a;\u5821\u5792\u673a\u4f5c\u4e3a\u552f\u4e00\u7684\u5165\u53e3&#xff0c;\u53ef\u4ee5\u9650\u5236\u7528\u6237\u901a\u8fc7\u5821\u5792\u673a\u6765\u8bbf\u95ee\u5185\u90e8\u7f51\u7edc\u8d44\u6e90&#xff0c;\u5b9e\u73b0\u4e86\u8bbf\u95ee\u63a7\u5236\u548c\u6743\u9650\u7ba1\u7406\u3002\u7528\u6237\u9700\u8981\u7ecf\u8fc7\u5821\u5792\u673a\u8ba4\u8bc1\u540e\u624d\u80fd\u8fdb\u5165\u5185\u90e8\u7f51\u7edc\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b89\u5168\u5ba1\u8ba1&#xff1a;\u5821\u5792\u673a\u53ef\u4ee5\u8bb0\u5f55\u7528\u6237\u7684\u6240\u6709\u64cd\u4f5c\u548c\u6d3b\u52a8&#xff0c;\u5305\u62ec\u767b\u5f55\u4fe1\u606f\u3001\u547d\u4ee4\u64cd\u4f5c\u7b49&#xff0c;\u4ee5\u4fbf\u8fdb\u884c\u5b89\u5168\u5ba1\u8ba1\u548c\u76d1\u63a7\u3002\u8fd9\u6709\u52a9\u4e8e\u53d1\u73b0\u6f5c\u5728\u7684\u5b89\u5168\u95ee\u9898\u548c\u8ffd\u8e2a\u7528\u6237\u884c\u4e3a\u3002<\/p>\n<\/li>\n<li>\n<p>\u9694\u79bb\u7f51\u7edc&#xff1a;\u901a\u8fc7\u5821\u5792\u673a\u4f5c\u4e3a\u4e2d\u8f6c\u7ad9&#xff0c;\u5b9e\u73b0\u4e86\u5185\u5916\u7f51\u7edc\u7684\u9694\u79bb\u3002\u5185\u90e8\u7f51\u7edc\u4e0d\u76f4\u63a5\u66b4\u9732\u5728\u516c\u7f51\u4e0a&#xff0c;\u63d0\u9ad8\u4e86\u7f51\u7edc\u7684\u5b89\u5168\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u96c6\u4e2d\u7ba1\u7406&#xff1a;\u5821\u5792\u673a\u96c6\u4e2d\u7ba1\u7406\u4e86\u5bf9\u591a\u4e2a\u670d\u52a1\u5668\u7684\u8bbf\u95ee&#xff0c;\u7ba1\u7406\u5458\u53ef\u4ee5\u901a\u8fc7\u5821\u5792\u673a\u7edf\u4e00\u7ba1\u7406\u548c\u76d1\u63a7\u5404\u7c7b\u8d44\u4ea7&#xff0c;\u7b80\u5316\u4e86\u8fd0\u7ef4\u7ba1\u7406\u7684\u590d\u6742\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b89\u5168\u9632\u62a4&#xff1a;\u5821\u5792\u673a\u53ef\u4ee5\u914d\u7f6e\u4e25\u683c\u7684\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\u3001\u591a\u5c42\u8ba4\u8bc1\u548c\u9632\u706b\u5899\u89c4\u5219&#xff0c;\u4fdd\u62a4\u5185\u90e8\u7f51\u7edc\u514d\u53d7\u6076\u610f\u653b\u51fb\u548c\u672a\u7ecf\u6388\u6743\u7684\u8bbf\u95ee\u3002<\/p>\n<\/li>\n<p>\u603b\u4f53\u800c\u8a00&#xff0c;\u5821\u5792\u673a\u5728\u7f51\u7edc\u5b89\u5168\u4e2d\u626e\u6f14\u7740\u91cd\u8981\u7684\u89d2\u8272&#xff0c;\u53ef\u4ee5\u63d0\u9ad8\u7f51\u7edc\u5b89\u5168\u6027\u3001\u7ba1\u7406\u6548\u7387\u548c\u5ba1\u8ba1\u53ef\u8ffd\u6eaf\u6027&#xff0c;\u5728\u4f01\u4e1a\u7f51\u7edc\u4e2d\u88ab\u5e7f\u6cdb\u5e94\u7528\u4ee5\u52a0\u5f3a\u7f51\u7edc\u5b89\u5168\u9632\u62a4\u3002<\/p>\n<h2 style=\"background-color:transparent\">\u5b9e\u9a8c\u4ecb\u7ecd<\/h2>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6a21\u62df\u4f01\u4e1a\u6216\u8005\u5b66\u6821\u5185\u90e8\u73af\u5883&#xff0c;\u6784\u5efa\u4e00\u4e2a\u9632\u706b\u5899\u670d\u52a1\u5668\u5b9e\u73b0\u5185\u90e8\u7f51\u7edc\u4e0a\u7f51&#xff0c;\u53d1\u5e03\u5185\u7f51\u7684web\u670d\u52a1\u548c\u5821\u5792\u673a&#xff0c;\u6784\u5efa\u5821\u5792\u673a\u5e2e\u52a9\u4f01\u4e1a\u4ee5\u66f4\u5b89\u5168\u7684\u65b9\u5f0f\u7ba1\u63a7\u548c\u767b\u5f55\u5404\u79cd\u7c7b\u578b\u7684\u8d44\u4ea7&#xff0c;\u540c\u65f6\u7ed9\u4e88\u5916\u7f51\u88ab\u6388\u4e88\u5821\u5792\u673a\u767b\u5f55\u6743\u9650\u7684\u7528\u6237\u53ef\u4ee5\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u5185\u90e8\u7f51\u7edc\u7684\u8d44\u6e90\u3002<\/p>\n<h2 style=\"margin-left:.0001pt;text-align:justify\">\u5b9e\u9a8c\u914d\u7f6e<\/h2>\n<h3 style=\"background-color:transparent\">1.\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u6240\u9700&#xff0c;\u89c4\u5212\u7f51\u7edc\u62d3\u6251\u56fe&#xff0c;IP\u5730\u5740\u7684\u914d\u7f6e\u548c\u7f51\u7edc\u9002\u914d\u5668\u7684\u9009\u62e9\u6a21\u5f0f\u95ee\u9898<\/h3>\n<p>\u5982\u4e0b\u56fe\u6240\u793a&#xff0c;\u4e3a\u4fdd\u8bc1\u5b9e\u9a8c\u7684\u771f\u5b9e\u6027\u548c\u53ef\u9760\u6027&#xff0c;\u7aef\u53e3\u914d\u7f6e\u53ef\u81ea\u5b9a\u4e49&#xff0c;IP\u5730\u5740\u4e0d\u8981\u53d1\u751f\u51b2\u7a81&#xff0c;web\u670d\u52a1\u5668&#xff08;192.168.110.2&#xff09;\u548c\u5821\u5792\u673a&#xff08;192.168.110.99&#xff09;\u7684\u7f51\u7edc\u9002\u914d\u5668\u5c5e\u4e8e\u4ec5\u4e3b\u673a\u6a21\u5f0f&#xff0c;\u9632\u706b\u5899\u914d\u4fe9\u4e2a\u7f51\u5361&#xff0c;\u540c\u65f6LAN\u53e3\u4e3a\u4ec5\u4e3b\u673a\u6a21\u5f0f&#xff08;192.168.110.254&#xff09;&#xff0c;WAN\u53e3\u914d\u4e3a\u6865\u63a5\u6a21\u5f0f&#xff08;192.168.1.54&#xff09;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1200\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024607-68118eef61be0.jpg\" width=\"1200\" \/><\/p>\n<h3>2.\u5728Vmware\u4e0a\u642d\u5efa\u73af\u5883&#xff0c;\u914d\u7f6e\u597dIP\u5730\u5740\u548c\u4e3b\u673a\u540d&#xff0c;\u7981\u7528selinux\u548cfirewalld\u670d\u52a1<\/h3>\n<p>1.\u642d\u5efa\u9632\u706b\u5899&#xff0c;\u5821\u5792\u673a&#xff0c;web\u670d\u52a1\u5668\u73af\u5883&#xff0c;\u7279\u522b\u6ce8\u610f\u9632\u706b\u5899\u9700\u8981\u914d\u7f6e\u4fe9\u5757\u7f51\u5361<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"504\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024609-68118ef140d76.jpg\" width=\"1004\" \/><\/p>\n<p>2.\u4fee\u6539\u7f51\u7edc\u9002\u914d\u5668<\/p>\n<p>\u70b9\u51fb\u53f3\u4e0b\u89d2\u7684\u7f51\u7edc\u9002\u914d\u5668&#xff0c;\u518d\u70b9\u51fb\u8bbe\u7f6e&#xff0c;\u5c06web\u670d\u52a1\u5668\u548c\u5821\u5792\u673a\u7684\u7f51\u7edc\u9002\u914d\u5668\u6539\u4e3a\u4ec5\u4e3b\u673a\u6a21\u5f0f&#xff0c;\u9632\u706b\u5899\u7f51\u7edc\u9002\u914d\u56681\u6539\u4e3a\u4ec5\u4e3b\u673a\u6a21\u5f0f&#xff0c;\u7f51\u7edc\u9002\u914d\u56682\u6539\u4e3a\u6865\u63a5\u6a21\u5f0f&#xff08;\u4fe9\u8005\u987a\u5e8f\u53ef\u4ee5\u8c03\u6362&#xff0c;\u4f46\u662f\u5efa\u8bae\u4f7f\u7528\u6865\u63a5\u6a21\u5f0f&#xff09;\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024609-68118ef1a89b5.jpg\" \/><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024610-68118ef20d41a.jpg\" \/><\/p>\n<p>3.\u914d\u7f6eIP\u5730\u5740\u548c\u4e3b\u673a\u540d<\/p>\n<p>\u901a\u8fc7ip add\u547d\u4ee4\u67e5\u770b\u9632\u706b\u5899&#xff0c;\u5821\u5792\u673a\u548cweb\u670d\u52a1\u5668\u5206\u914d\u7684IP\u5730\u5740<\/p>\n<p>ip add <\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024610-68118ef262432.jpg\" \/>\u5982\u679c\u8981\u4fee\u6539IP\u5730\u5740&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u7f51\u7edc\u914d\u7f6e\u6587\u4ef6&#xff0c;\u4fee\u6539IP\u5730\u5740\u53ca\u5176\u7f51\u5173\u3002&#xff08;\u5efa\u8bae\u4fee\u6539IP\u5730\u5740\u65f6\u8981\u67e5\u770bwindows\u7684\u7f51\u7edc\u8fde\u63a5\u60c5\u51b5&#xff0c;\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f&#xff0c;\u4e86\u89e3IP\u5730\u5740\u6240\u5728\u7684\u7f51\u6bb5\u3002\u56e0\u4e3a\u4ec5\u4e3b\u673a\u6a21\u5f0f\u4e0b&#xff0c;\u865a\u62df\u673a\u662f\u4e0eVmnet1\u8fde\u63a5&#xff0c;\u6865\u63a5\u6a21\u5f0f\u6700\u540e\u836f\u901a\u8fc7\u8def\u7531\u5668\u4e0e\u5916\u90e8\u7f51\u7edc\u8fde\u63a5&#xff0c;\u6240\u4ee5\u4e5f\u9700\u8981\u67e5\u770b\u8def\u7531\u5668\u7684IP\u5730\u5740&#xff09;\u90d1\u91cd\u58f0\u660e\u914d\u7f6e\u7684IP\u5730\u5740\u4e0d\u8981\u4e0e\u5176\u4ed6IP\u5730\u5740\u51fa\u73b0\u51b2\u7a81&#xff0c;\u7279\u522b\u662f\u7f51\u5173\u5730\u5740&#xff01;&#xff01;&#xff01;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024610-68118ef2c5115.jpg\" \/><\/p>\n<p>\u8fdb\u5165\u7f51\u7edc\u914d\u7f6e\u6587\u4ef6&#xff0c;\u7136\u540e\u67e5\u770b\u914d\u7f6e\u6587\u4ef6\u540d\u79f0&#xff0c;\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>cd \/etc\/sysconfig\/network-scripts\/<br \/>\nls<br \/>\nvim ifcfg-ens33<\/p>\n<p><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024611-68118ef332ce0.jpg\" \/>\u5de6\u56fe\u4e3a\u9632\u706b\u5899LAN\u53e3\u7f51\u7edc\u914d\u7f6e\u4fe1\u606f&#xff0c;\u9700\u8981\u6ce8\u610f&#xff0c;LAN\u53e3\u7684\u5730\u5740\u548c\u5821\u5792\u673a\u4ee5\u53caweb\u670d\u52a1\u5668\u662f\u540c\u4e00\u4e2a\u7f51\u6bb5&#xff0c;\u5e76\u4e14LAN\u53e3\u662f\u6b64\u7f51\u6bb5\u4e2d\u7684\u7f51\u5173\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024611-68118ef37cbcd.jpg\" \/>\u5de6\u56fe\u4e3a\u9632\u706b\u5899WAN\u53e3\u7684\u7f51\u7edc\u914d\u7f6e\u4fe1\u606f&#xff0c;\u9700\u8981\u6ce8\u610f&#xff0c;WAN\u53e3\u7684IP\u5730\u5740\u662f\u672c\u6b21\u5b9e\u9a8c\u4e2d\u9700\u8981\u7528\u5230\u7684DNAT\u6280\u672f\u7684\u5730\u5740&#xff0c;\u540c\u65f6\u4e5f\u662f\u5b9e\u9a8c\u4e2dweb\u670d\u52a1\u5668\u5185\u7f51\u7684\u516c\u5171IP\u5730\u5740&#xff0c;\u7f51\u5173\u5c31\u662f\u8def\u7531\u5668\u5730\u5740<\/p>\n<p>\u540c\u7406\u5c06web\u670d\u52a1\u5668\u4ee5\u53ca\u5821\u5792\u673a\u7684IP\u5730\u5740\u914d\u597d\u5c31\u884c&#xff0c;\u53ea\u8981\u6ce8\u610fIP\u5730\u5740\u4e0d\u8981\u51b2\u7a81&#xff0c;\u540c\u65f6\u5728\u540c\u4e00\u7f51\u6bb5\u4e2d&#xff0c;\u7f51\u5173\u5730\u5740\u4e3a\u9632\u706b\u5899LAN\u53e3\u7684IP\u5730\u5740<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024611-68118ef3c91ec.jpg\" \/><\/p>\n<p>\u6700\u540e\u914d\u7f6e\u597dIP\u5730\u5740\u540e\u4e00\u5b9a\u8981\u91cd\u542f\u7f51\u7edc\u670d\u52a1<\/p>\n<p>service network restart <\/p>\n<p>\u901a\u8fc7hostnamectl\u4fee\u6539\u4e3b\u673a\u540d<\/p>\n<p>hostnamectl set-hostname newhostname <\/p>\n<p>\u7981\u7528 SELinux \u670d\u52a1&#xff1a;<\/p>\n<li>\n<p>\u68c0\u67e5\u5f53\u524d SELinux \u72b6\u6001&#xff1a; \u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\u5f53\u524d SELinux \u7684\u72b6\u6001&#xff1a;<\/p>\n<p> sestatus<br \/>\n\u6216\u8005<br \/>\ngetenforce <\/li>\n<li>\n<p>\u4e34\u65f6\u7981\u7528 SELinux&#xff1a; \u5982\u679c SELinux \u5f53\u524d\u5904\u4e8e\u542f\u7528\u72b6\u6001&#xff0c;\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4e34\u65f6\u7981\u7528\u5b83&#xff0c;\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7getenforce\u67e5\u770b\u72b6\u6001&#xff1a;<\/p>\n<p>  setenforce 0 <\/li>\n<li>\n<p>\u6c38\u4e45\u7981\u7528 SELinux&#xff1a; \u82e5\u8981\u6c38\u4e45\u7981\u7528 SELinux&#xff0c;\u7f16\u8f91\/etc\/selinux\/config\u6587\u4ef6&#xff0c;\u5c06SELINUX&#061;enforcing\u6539\u4e3aSELINUX&#061;disabled&#xff1a;<\/p>\n<p> vim \/etc\/selinux\/config <\/li>\n<li>\n<p>\u91cd\u542f\u7cfb\u7edf&#xff1a; \u4e3a\u4e86\u4f7f SELinux \u7981\u7528\u751f\u6548&#xff0c;\u6700\u597d\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u3002<\/p>\n<\/li>\n<p>\u7981\u7528firewalld\u670d\u52a1<\/p>\n<p>service firewalld stop<\/p>\n<h3 style=\"background-color:transparent\">3.\u5728\u9632\u706b\u5899\u4e0a\u7f16\u5199\u811a\u672c\u5b9e\u73b0\u5f00\u542fSNAT\u548cDNAT\u529f\u80fd<\/h3>\n<p>\u53ef\u4ee5\u901a\u8fc7xshell\u8fde\u63a5\u9632\u706b\u5899&#xff0c;web\u670d\u52a1\u5668\u548c\u5821\u5792\u673a&#xff0c;\u65b9\u4fbf\u63a5\u4e0b\u91cc\u7684\u5b9e\u9a8c\u3002<\/p>\n<p>1.\u5728\u9632\u706b\u5899\u4e0a\u7f16\u5199\u811a\u672c\u5b9e\u73b0SNAT\u548cDNAT\u529f\u80fd&#xff0c;\u5f00\u542f\u8def\u7531\u529f\u80fd\u3002<\/p>\n<p>cd \/nat<br \/>\nvim snat_dnat.sh <\/p>\n<p>#!\/bin\/bash<br \/>\n#\u5173\u95ed\u9632\u706b\u5899<br \/>\nservice firewalld stop<br \/>\n#\u5f00\u542f\u8def\u7531\u529f\u80fd 1\u8868\u793a\u5f00\u542f\u8def\u7531\u529f\u80fd 0\u8868\u793a\u7981\u7528\u8def\u7531\u529f\u80fd<br \/>\necho 1 &gt;\/proc\/sys\/net\/ipv4\/ip_forward<br \/>\n#\u6e05\u695a\u539f\u6765iptables\u76f8\u5173\u8868\u91cc\u7684\u89c4\u5219<br \/>\niptables -F<br \/>\niptables -t nat -F<br \/>\n#\u6dfb\u52a0snat\u7b56\u7565<br \/>\n##iptables -t nat -A POSTROUTING -s 192.168.110.0\/24 -o ens37 -j SNAT &#8211;to-source 192.168.1.54<br \/>\niptables -t nat -A POSTROUTING -s 192.168.110.0\/24 -o ens37 -j MASQUERADE<br \/>\n#\u6dfb\u52a0DNAT\u7b56\u7565<br \/>\niptables -t nat -A PREROUTING -d 192.168.1.54 -p tcp &#8211;dport 80 -i ens37 -j DNAT &#8211;to-destination 192.168.110.2<br \/>\n#\u53d1\u5e03\u5821\u5792\u673a<br \/>\niptables -t nat -A PREROUTING -d 192.168.1.54 -p tcp &#8211;dport 2288 -i ens37 -j DNAT &#8211;to-destination 192.168.110.99:2299<\/p>\n<p>\u542f\u52a8\u811a\u672c\u5237\u65b0\u89c4\u5219\u94fe&#xff0c;\u53ef\u4ee5\u901a\u8fc7iptables\u67e5\u770b\u89c4\u5219\u94fe\u4fe1\u606f<\/p>\n<p>iptables -t nat -L -n<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024612-68118ef41cc50.jpg\" \/><\/p>\n<p>2.\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n<p>\u76f4\u63a5\u8bbe\u7f6e\u8ba1\u5212\u4efb\u52a1&#xff0c;\u4f7f\u7528 crontab -e \u547d\u4ee4\u7f16\u8f91\u5f53\u524d\u7528\u6237\u7684 crontab \u6587\u4ef6&#xff0c;\u6dfb\u52a0\u4ee5\u4e0b\u884c\u6765\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u6267\u884c\u811a\u672c&#xff08;\u5047\u8bbe\u811a\u672c\u4f4d\u4e8e\/path\/to\/myscript.sh&#xff0c;\u4e00\u5b9a\u8981\u7528\u7edd\u5bf9\u8def\u5f84&#xff01;&#xff01;&#xff01;&#xff09;&#xff1a;<\/p>\n<p>&#064;reboot \/bin\/bash \/path\/to\/myscript.sh<\/p>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa crontab\u3002<\/p>\n<h3 style=\"background-color:transparent\">4.\u52a0\u56fa\u5821\u5792\u673a\u7684ssh\u670d\u52a1&#xff0c;\u5f00\u542fiptables<\/h3>\n<p>\u4fee\u6539\u7aef\u53e3\u53f7&#xff0c;\u7981\u7528root\u7528\u6237\u767b\u5f55\u3002&#xff08;\u5982\u679c\u9700\u8981\u5b9e\u9a8c\u66f4\u52a0\u771f\u5b9e&#xff0c;\u53ef\u4ee5\u628a\u9632\u706b\u5899\u4e5f\u7981\u7528root\u7528\u6237\u767b\u5f55&#xff0c;\u4f46\u662fxshell\u4f1a\u65ad\u6389&#xff0c;\u56e0\u4e3axshell\u767b\u5f55\u8fc7\u53bb\u9009\u7684\u662froot&#xff0c;\u4e0d\u8fc7\u8981\u662f\u4fee\u6539\u7684\u8bdd&#xff0c;\u53ef\u4ee5\u5728\u9632\u706b\u5899\u4e0a\u65b0\u5efa\u4e00\u4e2a\u65b0\u7528\u6237\u5e76\u914d\u597d\u5bc6\u7801&#xff0c;xshell\u901a\u8fc7\u7528\u6237\u767b\u5f55\u8fc7\u53bb\u5373\u53ef&#xff0c;\u4e0d\u8fc7\u535a\u4e3b\u672a\u8fdb\u884c\u6b64\u64cd\u4f5c&#xff0c;\u9700\u8981\u7684\u8bdd\u53ef\u4ee5\u81ea\u884c\u6839\u636e\u5821\u5792\u673a\u7684\u7981\u7528\u64cd\u4f5c\u987a\u5e8f\u53bb\u7981\u7528\u9632\u706b\u5899\u7684root\u7528\u6237\u767b\u5f55\u53ca\u7aef\u53e3\u53f7&#xff09;<\/p>\n<p>vim \/etc\/ssh\/sshd_config <\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024612-68118ef465033.jpg\" \/><\/p>\n<p>\u4fee\u6539\u5b8c\u540e&#xff0c;xshell\u4f1a\u65ad\u6389&#xff0c;\u4e0d\u8fc7\u4e0d\u7528\u62c5\u5fc3&#xff0c;\u53ef\u4ee5\u5728\u865a\u62df\u673a\u4e2d\u914d\u7f6e\u4e00\u4e2a\u666e\u901a\u7528\u6237\u6765\u767b\u5f55&#xff0c;\u540c\u65f6\u8fd9\u4e2a\u666e\u901a\u7528\u6237\u4e5f\u662f\u767b\u5f55\u5821\u5792\u673a\u7684\u4e00\u4e2a\u6388\u6743\u7528\u6237&#xff01;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024612-68118ef4abbda.jpg\" \/><\/p>\n<h3 style=\"background-color:transparent\">5.\u5728web\u670d\u52a1\u5668\u4e0a\u914d\u7f6etcp-wrappers\u529f\u80fd<\/h3>\n<p>\u5148\u4fee\u6539allow\u53caiptables\u4e2d\u7684\u767d\u540d\u5355<\/p>\n<p>vim \/etc\/hosts.allow <\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024612-68118ef4efca9.jpg\" \/><\/p>\n<p>192.168.110.1\u662f\u4e3a\u4e86\u4e0d\u548c\u6211\u7684windows\u65ad\u4e86\u8fde\u63a5<\/p>\n<p>\u518d\u4fee\u6539deny\u53caiptables\u4e2d\u7684\u9ed1\u540d\u5355<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024613-68118ef56e87e.jpg\" \/><\/p>\n<p>\u56e0\u4e3atcp-wrappers\u5148\u770ballow\u6587\u4ef6\u518d\u770bdeny\u6587\u4ef6&#xff0c;\u6240\u4ee5\u9664\u4e86\u6307\u5b9a\u7684IP\u5730\u5740\u53ef\u4ee5\u8fde\u63a5\u4ee5\u5916&#xff0c;\u5176\u4ed6\u90fd\u88ab\u62d2\u7edd&#xff0c;\u4ece\u800c\u6ee1\u8db3\u4e86\u53ea\u6709\u5821\u5792\u673a\u7684IP\u5730\u5740\u53ef\u4ee5\u8bbf\u95eessh\u670d\u52a1&#xff0c;\u53ca\u8bbf\u95ee\u5185\u7f51\u91cc\u7684\u8d44\u6e90<\/p>\n<p>\u9632\u706b\u5899&#xff0c;\u5821\u5792\u673a\u548cweb\u670d\u52a1\u5668\u90fd\u9700\u8981\u5237\u65b0\u4e00\u4e0bssh\u670d\u52a1<\/p>\n<p>service sshd restart<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u67e5\u770bnetstat-\u7f51\u7edc\u8fde\u63a5\u72b6\u6001&#xff0c;\u67e5\u770b\u662f\u5426\u8fde\u63a5\u4e0a\u4e86sshd\u670d\u52a1<\/p>\n<p> netstat -anplut |egrep &#034;sshd&#034;<\/p>\n<h3>6.\u6d4b\u8bd5\u5821\u5792\u673a\u529f\u80fd<\/h3>\n<p>\u53ef\u4ee5\u914d\u7f6e\u7b2c\u56db\u53f0\u8bbe\u5907&#xff0c;\u6216\u8005\u5c31\u7528\u9632\u706b\u5899\u6765\u6a21\u62df\u5916\u7f51\u6ca1\u6709\u5f97\u5230web\u670d\u52a1\u5668\u8bb8\u53ef\u7684\u7528\u6237\u767b\u5f55\u8bbf\u95eeweb\u670d\u52a1&#xff0c;\u67e5\u770b\u5b9e\u9a8c\u662f\u5426\u6210\u529f<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024613-68118ef5b5d95.jpg\" \/><\/p>\n<p>\u535a\u4e3b\u662f\u901a\u8fc7\u9632\u706b\u5899\u53bb\u76f4\u63a5\u767b\u5f55\u8bbf\u95eeweb\u670d\u52a1\u5668&#xff0c;\u660e\u663e\u8fde\u63a5\u5931\u8d25<\/p>\n<p>\u6700\u540e\u901a\u8fc7\u5821\u5792\u673a\u8fde\u63a5web\u670d\u52a1<\/p>\n<p>1.\u9996\u5148\u901a\u8fc7xshell\u4f5c\u4e3a\u8fdc\u7a0b\u767b\u5f55\u7684\u8bbe\u5907<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024614-68118ef604208.jpg\" \/><\/p>\n<p>\u6ce8\u610f&#xff01;&#xff01;&#xff01;\u4e3b\u673a\u53f7\u662f\u9632\u706b\u5899\u7684WAN\u53e3\u5730\u5740&#xff0c;\u4e0d\u8981\u76f4\u63a5\u586b\u5199\u5821\u5792\u673a\u7684&#xff0c;\u9632\u706b\u5899\u4f1a\u901a\u8fc7DNAT\u6280\u672f\u5c06\u76ee\u7684\u5730\u5740\u4e3a192.168.1.54\u7684\u6570\u636e\u7684IP\u5730\u5740\u4fee\u6539\u4e3a\u5821\u5792\u673a\u7684IP\u5730\u5740192.168.110.99&#xff0c;\u7aef\u53e32288\u662f\u518d\u9632\u706b\u5899\u7f16\u5199\u811a\u672c\u7684\u65f6\u5019\u81ea\u5b9a\u4e49\u7684\u3002\u5343\u4e07\u8981\u6ce8\u610f\u4e0d\u662f\u76f4\u63a5\u8fde\u63a5\u5821\u5792\u673a&#xff0c;\u800c\u662f\u901a\u8fc7DNAT\u6280\u672f\u8df3\u5230\u5821\u5792\u673a&#xff0c;\u5728\u901a\u8fc7\u5821\u5792\u673a\u53bb\u8bbf\u95eeweb\u670d\u52a1\u00a0\u00a0<\/p>\n<p>\u7528\u6237\u767b\u5f55\u4e0d\u8981\u7528root&#xff0c;\u56e0\u4e3aroot\u7528\u6237\u5df2\u7ecf\u88ab\u7981\u6b62\u4e86&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u65b0\u5efa\u7684\u7528\u6237\u53bb\u767b\u5f55<\/p>\n<p>ssh root&#064;ip\u5730\u5740 <\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024614-68118ef651e35.jpg\" \/><\/p>\n<p>\u767b\u9646\u6210\u529f&#xff0c;\u5b9e\u9a8c\u6210\u529f<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u5b9e\u9a8c\u4e2d\u9700\u8981\u6ce8\u610f&#xff1a;<\/p>\n<p>1.\u5982\u679c\u914d\u5b8cIP\u5730\u5740\u4ee5\u540e&#xff0c;\u4e00\u76f4\u6389\u7ebf&#xff0c;\u53ef\u80fd\u662fIP\u5730\u5740\u51b2\u7a81\u4e86&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u53e6\u5916\u4e00\u53f0\u6b63\u5e38\u7684\u8bbe\u5907\u53bbarping\u4e00\u4e0b&#xff0c;\u67e5\u770b\u5177\u4f53\u60c5\u51b5&#xff0c;\u4f46\u662f\u8981\u6ce8\u610fIP\u5730\u5740\u914d\u7f6e\u4e00\u5b9a\u8981\u7b26\u5408\u89c4\u5b9a<\/p>\n<p>2.\u5982\u679c\u52a0\u56fassh\u670d\u52a1\u7684\u65f6\u5019&#xff0c;\u91cd\u542f\u5931\u8d25\u53ef\u80fd\u662f\u56e0\u4e3aSElinux\u6ca1\u6709\u5173\u95ed&#xff0c;\u53ef\u4ee5\u91cd\u65b0\u68c0\u67e5\u5173\u95edSElinux<\/p>\n<p>3.\u5982\u679c\u5821\u5792\u673a\u8fde\u4e0d\u4e0a&#xff0c;\u53ef\u80fd\u662fsshd\u670d\u52a1\u6ca1\u6709\u5f00\u542f\u6210\u529f&#xff0c;\u6216\u8005\u662ffirewalld\u6ca1\u6709\u5173\u95ed&#xff0c;iptables\u89c4\u5219\u94fe\u4e0d\u6b63\u786e&#xff0c;\u901a\u8fc7\u67e5\u770biptables\u89c4\u5219\u94fe\u60c5\u51b5\u548c\u9632\u706b\u5899\u5f00\u542fDNAT\u548cSNAT\u670d\u52a1\u7684\u811a\u672c&#xff0c;\u6ce8\u610f\u7aef\u53e3\u548c\u534f\u8bae\u4e00\u5b9a\u4e0d\u8981\u51fa\u9519<\/p>\n<p>4.\u6b64\u5b9e\u9a8c\u672a\u8bbe\u7f6e\u514d\u5bc6\u767b\u5f55&#xff0c;\u5b58\u5728\u4e00\u5b9a\u7684\u7f3a\u9677&#xff0c;\u6240\u4ee5\u4ec5\u4f9b\u53c2\u8003&#xff0c;\u591a\u591a\u6307\u6559<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf31\u6b21\u3002\u5b9e\u9a8c\u4e2d\u9700\u8981\u6ce8\u610f\uff1a1.\u5982\u679c\u914d\u5b8cIP\u5730\u5740\u4ee5\u540e\uff0c\u4e00\u76f4\u6389\u7ebf\uff0c\u53ef\u80fd\u662fIP\u5730\u5740\u51b2\u7a81\u4e86\uff0c\u53ef\u4ee5\u901a\u8fc7\u53e6\u5916\u4e00\u53f0\u6b63\u5e38\u7684\u8bbe\u5907\u53bbarping\u4e00\u4e0b\uff0c\u67e5\u770b\u5177\u4f53\u60c5\u51b5\uff0c\u4f46\u662f\u8981\u6ce8\u610fIP\u5730\u5740\u914d\u7f6e\u4e00\u5b9a\u8981\u7b26\u5408\u89c4\u5b9a2.\u5982\u679c\u52a0\u56fassh\u670d\u52a1\u7684\u65f6\u5019\uff0c\u91cd\u542f\u5931\u8d25\u53ef\u80fd\u662f\u56e0\u4e3aSElinux\u6ca1\u6709\u5173\u95ed\uff0c\u53ef\u4ee5\u91cd\u65b0\u68c0\u67e5\u5173\u95edSElinux3.\u5982\u679c\u5821\u5792\u673a\u8fde\u4e0d\u4e0a\uff0c\u53ef\u80fd\u662fsshd\u670d\u52a1\u6ca1\u6709\u5f00\u542f\u6210\u529f\uff0c\u6216\u8005\u662ffirewalld\u6ca1\u6709\u5173\u95ed\uff0ciptables\u89c4\u5219\u94fe\u4e0d\u6b63\u786e\uff0c\u901a\u8fc7\u67e5\u770biptables\u89c4\u5219\u94fe\u60c5\u51b5\u548c\u9632\u706b\u5899\u5f00\u542fDNAT\u548cSNAT\u670d\u52a1\u7684\u811a\u672c\uff0c\u6ce8\u610f\u7aef\u53e3\u548c\u534f\u8bae\u4e00\u5b9a\u4e0d\u8981\u51fa\u9519\u3002_\u5821\u5792\u673a\u5728\u7f51\u7edc\u4e2d\u7684\u4f4d\u7f6e<\/p>\n","protected":false},"author":2,"featured_media":34690,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,275,43,78],"topic":[],"class_list":["post-34707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-web","tag-43","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \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\/34707.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf31\u6b21\u3002\u5b9e\u9a8c\u4e2d\u9700\u8981\u6ce8\u610f\uff1a1.\u5982\u679c\u914d\u5b8cIP\u5730\u5740\u4ee5\u540e\uff0c\u4e00\u76f4\u6389\u7ebf\uff0c\u53ef\u80fd\u662fIP\u5730\u5740\u51b2\u7a81\u4e86\uff0c\u53ef\u4ee5\u901a\u8fc7\u53e6\u5916\u4e00\u53f0\u6b63\u5e38\u7684\u8bbe\u5907\u53bbarping\u4e00\u4e0b\uff0c\u67e5\u770b\u5177\u4f53\u60c5\u51b5\uff0c\u4f46\u662f\u8981\u6ce8\u610fIP\u5730\u5740\u914d\u7f6e\u4e00\u5b9a\u8981\u7b26\u5408\u89c4\u5b9a2.\u5982\u679c\u52a0\u56fassh\u670d\u52a1\u7684\u65f6\u5019\uff0c\u91cd\u542f\u5931\u8d25\u53ef\u80fd\u662f\u56e0\u4e3aSElinux\u6ca1\u6709\u5173\u95ed\uff0c\u53ef\u4ee5\u91cd\u65b0\u68c0\u67e5\u5173\u95edSElinux3.\u5982\u679c\u5821\u5792\u673a\u8fde\u4e0d\u4e0a\uff0c\u53ef\u80fd\u662fsshd\u670d\u52a1\u6ca1\u6709\u5f00\u542f\u6210\u529f\uff0c\u6216\u8005\u662ffirewalld\u6ca1\u6709\u5173\u95ed\uff0ciptables\u89c4\u5219\u94fe\u4e0d\u6b63\u786e\uff0c\u901a\u8fc7\u67e5\u770biptables\u89c4\u5219\u94fe\u60c5\u51b5\u548c\u9632\u706b\u5899\u5f00\u542fDNAT\u548cSNAT\u670d\u52a1\u7684\u811a\u672c\uff0c\u6ce8\u610f\u7aef\u53e3\u548c\u534f\u8bae\u4e00\u5b9a\u4e0d\u8981\u51fa\u9519\u3002_\u5821\u5792\u673a\u5728\u7f51\u7edc\u4e2d\u7684\u4f4d\u7f6e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/34707.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-30T02:46:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024607-68118eef61be0.jpg\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34707.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/34707.html\",\"name\":\"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-30T02:46:15+00:00\",\"dateModified\":\"2025-04-30T02:46:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/34707.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/34707.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34707.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668\"}]},{\"@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":"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \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\/34707.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf31\u6b21\u3002\u5b9e\u9a8c\u4e2d\u9700\u8981\u6ce8\u610f\uff1a1.\u5982\u679c\u914d\u5b8cIP\u5730\u5740\u4ee5\u540e\uff0c\u4e00\u76f4\u6389\u7ebf\uff0c\u53ef\u80fd\u662fIP\u5730\u5740\u51b2\u7a81\u4e86\uff0c\u53ef\u4ee5\u901a\u8fc7\u53e6\u5916\u4e00\u53f0\u6b63\u5e38\u7684\u8bbe\u5907\u53bbarping\u4e00\u4e0b\uff0c\u67e5\u770b\u5177\u4f53\u60c5\u51b5\uff0c\u4f46\u662f\u8981\u6ce8\u610fIP\u5730\u5740\u914d\u7f6e\u4e00\u5b9a\u8981\u7b26\u5408\u89c4\u5b9a2.\u5982\u679c\u52a0\u56fassh\u670d\u52a1\u7684\u65f6\u5019\uff0c\u91cd\u542f\u5931\u8d25\u53ef\u80fd\u662f\u56e0\u4e3aSElinux\u6ca1\u6709\u5173\u95ed\uff0c\u53ef\u4ee5\u91cd\u65b0\u68c0\u67e5\u5173\u95edSElinux3.\u5982\u679c\u5821\u5792\u673a\u8fde\u4e0d\u4e0a\uff0c\u53ef\u80fd\u662fsshd\u670d\u52a1\u6ca1\u6709\u5f00\u542f\u6210\u529f\uff0c\u6216\u8005\u662ffirewalld\u6ca1\u6709\u5173\u95ed\uff0ciptables\u89c4\u5219\u94fe\u4e0d\u6b63\u786e\uff0c\u901a\u8fc7\u67e5\u770biptables\u89c4\u5219\u94fe\u60c5\u51b5\u548c\u9632\u706b\u5899\u5f00\u542fDNAT\u548cSNAT\u670d\u52a1\u7684\u811a\u672c\uff0c\u6ce8\u610f\u7aef\u53e3\u548c\u534f\u8bae\u4e00\u5b9a\u4e0d\u8981\u51fa\u9519\u3002_\u5821\u5792\u673a\u5728\u7f51\u7edc\u4e2d\u7684\u4f4d\u7f6e","og_url":"https:\/\/www.wsisp.com\/helps\/34707.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-30T02:46:15+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250430024607-68118eef61be0.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/34707.html","url":"https:\/\/www.wsisp.com\/helps\/34707.html","name":"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-30T02:46:15+00:00","dateModified":"2025-04-30T02:46:15+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/34707.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/34707.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/34707.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5821\u5792\u673a\/\u8df3\u677f\u673a\u8fde\u63a5\u5185\u7f51\u670d\u52a1\u5668"}]},{"@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\/34707","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=34707"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/34707\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/34690"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=34707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=34707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=34707"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=34707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}