{"id":23086,"date":"2020-02-09T00:19:33","date_gmt":"2020-02-08T16:19:33","guid":{"rendered":"http:\/\/4563.org\/?p=23086"},"modified":"2020-02-09T00:19:33","modified_gmt":"2020-02-08T16:19:33","slug":"%e6%8e%a5%e4%b8%8a%e4%b8%80%e7%af%87%e4%bc%aaiplc%e7%9a%84%ef%bc%8c%e5%9b%bd%e5%86%85vps%e6%80%8e%e4%b9%88%e7%8e%a9%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=23086","title":{"rendered":"\u63a5\u4e0a\u4e00\u7bc7\u4f2a\u201ciplc\u201d\u7684\uff0c\u56fd\u5185vps\u600e\u4e48\u73a9\uff1f"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u8be1\u8c32<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u63a5\u4e0a\u4e00\u7bc7\u4f2a\u201ciplc\u201d\u7684\uff0c\u56fd\u5185vps\u600e\u4e48\u73a9\uff1f<\/h3>\n<p>  \t\t\u63a5\u4e0a\u4e00\u7bc7\uff1ahttps:\/\/www.hostloc.com\/thread-642067-1-1.html<\/p>\n<p>  \u5982\u679c\u4f60\u5728\u56fd\u5185\u6ca1\u6709\u670d\u52a1\u5668\u65e0\u6cd5\u5f00\u5c0f\u9e21\u600e\u4e48\u529e\uff1f\u8fd8\u6709\u6ca1\u6709\u529e\u6cd5\u4f4e\u4ef7\u83b7\u5f97\u8fd9\u79cd\u96a7\u9053\u843d\u5730\u7684\u65b9\u5f0f\u5462\uff1f<\/p>\n<p>  \u6709\u7684\u3002\u7528docker\u5c31\u597d\uff0c\u6ca1\u5fc5\u8981\u5f00\u5c0f\u9e21\u4e86\u3002<\/p>\n<p>  \u4f60\u8981\u505a\u7684\u662f\uff1a<\/p>\n<p>  1. \u627e\u4e2a\u56fd\u5185\u7f51\u7edc\u8fd8\u4e0d\u9519\u7684vps\uff0c\u6bd4\u5982\u4f60\u5c31\u4efb\u6027\u5f00\u4e2aecs\u6309\u6d41\u91cf\u8ba1\u8d39\uff0c\u628a\u53e3\u5b50\u62c9\u6ee1\uff0c\u8fd9\u4e2a\u8dd1docker<br \/>  2. \u56fd\u5916\u843d\u5730\u7528\u7684\u670d\u52a1\u5668\u6216vps\uff0c\u4e0d\u7528\u8dd1docker<br \/>  3. \u7ed9\u4e24\u8fb9\u5efa\u7acbwireguard\u96a7\u9053\uff0c\u4f60\u7528\u5176\u4ed6\u96a7\u9053\u4e5f\u884c\uff0c\u4f60\u80fd\u6253\u901a\u5c31\u597d<br \/>  4. \u56fd\u5185vps\u5b89\u88c5docker\uff0c\u5e76\u65b0\u5efa\u4e00\u4e2anetwork\u5355\u72ec\u7ed9\u5bb9\u5668\u7528\uff0c\u4e0d\u80fd\u7528\u9ed8\u8ba4\u7684docker0\u7684\u4fa8\u63a5\u7f51\u7edc<br \/>  5. \u7b56\u7565\u8def\u7531\u5230\u4f60\u521a\u521a\u65b0\u5efa\u7684docker network<\/p>\n<p>  \u524d\u97623\u4e2a\u6b65\u9aa4\u4e0d\u7528\u8bf4\u4e86\u3002\u90a3docker\u600e\u4e48\u73a9\uff1f\u6211\u8fd9\u91cc\u5c31\u76f4\u63a5\u7528\u547d\u4ee4\u884c\uff0c\u6ca1\u5b89\u88c5\u9762\u677f\u4e86\u3002<\/p>\n<p>  1. \u5b89\u88c5docker\uff0c\u7528\u4e00\u952e\u65b9\u5f0f\u6700\u9760\u8c31\uff0c\u56fd\u5185\u5efa\u8bae\u7528\u963f\u91cc\u4e91\u7684mirrors<br \/>  curl -fsSL https:\/\/get.docker.com | bash -s docker &#8211;mirror Aliyun<\/p>\n<p>  2. \u521b\u5efadocker\u7f51\u7edc<br \/>  docker network create nat<\/p>\n<p>  \u521b\u5efa\u5b8c\u6ce8\u610f\u770b\u4e00\u4e0b\u8fd9\u4e2a\u7f51\u7edc\u7684ip\u6bb5<br \/>  docker network inspect nat<\/p>\n<p>  \u6211\u7684\u4f8b\u5b50\u4e2d\u662f172.19.0.0\/16<br \/>  https:\/\/s2.ax1x.com\/2020\/02\/08\/1W5KIK.png<\/p>\n<p>  3.\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668\u5427\uff0c\u6216\u8005\u4f60\u53ef\u4ee5\u627e\u4e00\u4e2as5\u7684\u955c\u50cf\uff0c\u76f4\u63a5\u8dd1\u5728nat\u7684\u7f51\u7edc\u4e0b\uff0c\u8bb0\u5f97\u5f00\u4e2a\u7aef\u53e3\u51fa\u6765\u54c8<br \/>  docker run &#8211;net=nat -itd &#8211;name=container ubuntu<\/p>\n<p>  \u6700\u540e\u628a\u90a3\u5565\u7b56\u7565\u8def\u7531\u6539\u4e00\u4e0b\u5230docker\u65b0\u5efa\u7684network\u5c31\u597d\u4e86\u3002<\/p>\n<p>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u5206\u5272\u7ebf&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>  \u6d4b\u8bd5<\/p>\n<p>  \u56fd\u5185\u662f\u963f\u91cc\u4e91ecs \u6df1\u5733\u673a\u623f\uff0c\u6309\u6d41\u91cf\u8ba1\u8d39\u7684 100M\u7aef\u53e3\u901f\u5ea6<br \/>  \u843d\u5730\u662f\u6fb3\u95e8CTM\uff0c\u6ca1\u6709CN2\u52a0\u6210<\/p>\n<p>  \u6bd4\u8f83\u90c1\u95f7\u7684\u662f\uff0c\u56fd\u5185\u7684\u673a\u623f\u540c\u6837\u662f\u6df1\u5733\uff0c\u600e\u4e48\u963f\u91cc\u4e91\u8fc7\u53bb\u5c31\u898140ms\u4e86\u3002<\/p>\n<p>  \u9996\u5148\u662f\u6ca1\u5f00\u7b56\u7565\u8def\u7531\u7684\u60c5\u51b5\u4e0b\u7684mtr 8.8.8.8<br \/>  https:\/\/s2.ax1x.com\/2020\/02\/09\/1WoUC8.png<\/p>\n<p>  \u5f00\u4e86\u7b56\u7565\u8def\u7531<br \/>  https:\/\/s2.ax1x.com\/2020\/02\/09\/1WTCIP.png<\/p>\n<p>  speedtest\u6d4b\u8bd5\u7ed3\u679c\u8fd8\u662f\u572825Mbps\u5de6\u53f3\u7684\u4e0b\u884c<br \/>  https:\/\/s2.ax1x.com\/2020\/02\/09\/1WTQiV.png<\/p>\n<p>  \u901f\u5ea6\u4e0a\u4e0d\u53bb\u7684\u539f\u56e0\u6709\u53ef\u80fd\u662fudp\u7684qos\u5bfc\u81f4\u7684\uff0c\u4e5f\u53ef\u80fd\u662f\u52a0\u5bc6\u7b97\u6cd5\u7684\u539f\u56e0\uff0c\u4e5f\u6709\u53ef\u80fd\u662f\u6211\u8bbe\u7f6e\u7684mtu\u592a\u9ad8\u3002\u603b\u4e4b\u56de\u5934\u6362\u5176\u4ed6\u65b9\u5f0f\u7684\u96a7\u9053\u518d\u8bd5\u8bd5\u4e86\u3002bye\uff5e\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h2o<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u641e\u90a3\u4e48\u9ebb\u70e6\u5e72\u561b\uff0c\u51e0\u4e2aV P N\u8fde\u8d77\u6765\u5c31\u662f\u4e86\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8be1\u8c32 \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u63a5\u4e0a\u4e00\u7bc7\u4f2a\u201c&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\/23086"}],"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=23086"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/23086\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23086"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}