{"id":234564,"date":"2020-12-28T21:14:21","date_gmt":"2020-12-28T13:14:21","guid":{"rendered":"http:\/\/4563.org\/?p=234564"},"modified":"2020-12-28T21:14:21","modified_gmt":"2020-12-28T13:14:21","slug":"%e5%a4%a7%e4%bd%ac%e4%bb%ac%ef%bc%8c%e7%9f%a5%e9%81%93%e4%bf%ae%e7%bd%97%e4%ba%91%e7%9a%84-nat-%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e7%ab%af%e5%8f%a3%e6%98%a0%e5%b0%84%e5%90%97%ef%bc%8c%e6%88%91","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=234564","title":{"rendered":"\u5927\u4f6c\u4eec\uff0c\u77e5\u9053\u4fee\u7f57\u4e91\u7684 NAT \u600e\u4e48\u8bbe\u7f6e\u7aef\u53e3\u6620\u5c04\u5417\uff0c\u6211\u600e\u4e48\u8bbe\u7f6e\u672c\u5730 SSH \u90fd\u8fde\u4e0d\u4e0a\u3002"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5927\u4f6c\u4eec\uff0c\u77e5\u9053\u4fee\u7f57\u4e91\u7684 NAT \u600e\u4e48\u8bbe\u7f6e\u7aef\u53e3\u6620\u5c04\u5417\uff0c\u6211\u600e\u4e48\u8bbe\u7f6e\u672c\u5730 SSH \u90fd\u8fde\u4e0d\u4e0a\u3002               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ptmicky <\/span>  <span><i><\/i> 12<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u4fee\u7f57\u4e91\u8bd5\u8d2d\u4e86\u4e00\u4e2a NAT\uff0c\u8be5 NAT \u662f\u5171\u4eab IP\uff0c\u63d0\u4f9b\u4e86\u51e0\u4e2a\u8f6c\u53d1\u7aef\u53e3\uff0c\u6211\u8bbe\u7f6e\u597d\u5916\u90e8\u7aef\u53e3 9906\uff0c\u7528\u4fee\u7f57\u4e91\u7684\u5728\u7ebf VNC \u53ef\u4ee5\u76f4\u63a5\u8fde\u63a5\uff0c\u8bbf\u95ee\u64cd\u4f5c\u3002<br \/>\u4f46\u548c\u4ee5\u5f80\u63a5\u89e6\u5230\u7684 VPS \u4e0d\u540c\uff0c\u672c\u5730 Xshell \u8bbe\u7f6e\u597d IP \u7aef\u53e3\u548c root \u5bc6\u7801\u540e\u4e00\u76f4\u8bbf\u95ee\u4e0d\u4e0a\uff0c\u63d0\u793a\u201cSSH \u670d\u52a1\u5668\u62d2\u7edd\u4e86\u5bc6\u7801\u201d\u3002<br \/>\u5411\u5ba2\u670d\u53d1\u8d77\u5de5\u5355\uff0c\u88ab\u544a\u77e5\uff1a<\/p>\n<p>\u201c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u5230 22 \u7aef\u53e3\u7684\u6620\u5c04\uff0c\u5de6\u4fa7\u586b\u4efb\u610f\u672a\u88ab\u5360\u7528\u7684\u7aef\u53e3\uff0c\u53f3\u4fa7\u586b 22\uff0c\u94fe\u63a5\u4f7f\u7528\u5de6\u4fa7\u8fde\u63a5\u201d\u3002<\/p>\n<p>\u6211\u53c2\u8003\u4e86\u672c\u5730\u7aef\u53e3\u8f6c\u53d1\uff0c\u8bbe\u7f6e\u5982<br \/>ssh -f -N -L 9906:192.168.58.101:22 192.168.58.101<br \/>\u7684\u8f6c\u53d1\u547d\u4ee4\uff0c\u5c06\u53d1\u9001\u5230 9906 \u7aef\u53e3\u7684\u6570\u636e\u8f6c\u53d1\u5230 192.168.58.101 \u7684 22 \u7aef\u53e3<\/p>\n<p>\u7528 ss -tna \u53ef\u4ee5\u67e5\u770b\u5230\u5728\u7ebf\u7684 VNC \u8fde\u63a5\u548c\u76d1\u542c\u7aef\u53e3\uff0c\u4f46\u662f\u6211\u672c\u5730\u7528 xshell \u8fd8\u662f\u8fde\u63a5\u4e0d\u4e0a\uff0c\u4e0d\u77e5\u9053\u95ee\u9898\u51fa\u5728\u54ea\u91cc\uff0c\u4e5f\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u7406\u89e3\u5bf9\uff0c\u5927\u4f6c\u4eec\u5e2e\u5fd9\u70b9\u62e8\u4e00\u4e0b\u3002      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4534804\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ptmicky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u81ea\u5df1\u6765\u56de\u7b54\u5427\u3002\u3002\u3002<\/p>\n<p>\u6253\u5f00\u4fee\u7f57\u4e91\u7ba1\u7406\u9762\u677f\u2192\u5b9e\u4f8b\u7ba1\u7406\u2192\u914d\u7f6e\u7aef\u53e3\uff0c\u5de6\u8fb9\u5916\u90e8\u7aef\u53e3\u8f93\u5165 22222\uff0c\u53f3\u8fb9\u5b9e\u4f8b\u7aef\u53e3\u586b\u5199 22\uff0c\u70b9\u51fb\u4fdd\u5b58\u51fa\u53e3\uff0c\u518d\u70b9\u51fb\u4fdd\u5b58\u2192\u5b8c\u6210\u3002<\/p>\n<p>Xshell \u91cc\u9762\u8bbe\u7f6e\u53f7 NAT \u7684 IP \u548c\u7aef\u53e3\u53f7\u5982 22222\uff0c\u975e 22\uff0c\u914d\u7f6e\u597d\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\u7136\u540e\u70b9\u51fb\u8fde\u63a5\uff0c\u5c31\u53ef\u4ee5\u8fde\u4e0a\u4e86\u3002<\/p>\n<p>\u5c31\u8fd9\u6837\u6211\u7279\u4e48\u641e\u4e86 2 \u5929\u4e86\u3002\u3002\u3002\u3002\u3002\u3002\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u4f6c\u4eec\uff0c\u77e5\u9053\u4fee\u7f57\u4e91\u7684 NAT \u600e\u4e48&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/234564"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=234564"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/234564\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=234564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=234564"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=234564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}