{"id":288,"date":"2020-03-18T17:44:18","date_gmt":"2020-03-18T09:44:18","guid":{"rendered":"https:\/\/chrica.club\/?p=288"},"modified":"2021-08-27T15:45:24","modified_gmt":"2021-08-27T07:45:24","slug":"%e8%87%aa%e5%bb%ba%e5%86%85%e7%bd%91%e4%ba%92%e8%81%94%e9%9a%a7%e9%81%93","status":"publish","type":"post","link":"https:\/\/umcro.com\/?p=288","title":{"rendered":"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u8fd9\u4e2a\u6839\u672c\u5c31\u6bd4\u4e0d\u8fc7\u963f\u91cc\u4f01\u4e1a\u7f51CEN\uff0c\u5145\u5176\u91cf\u4e5f\u5c31\u662f\u7c7b\u4f3cMPLS\u7684\u73a9\u610f\u513f\uff0c\u4e0d\u8fc7\u4e5f\u80fd\u5f97\u5230\u7c7b\u4f3ciplc\u7684\u4f53\u9a8c\u3002 \u5176\u4ed6\u67e5\u770b <em>\u963f\u91cc\u4f01\u4e1a\u7f51CEN<\/em>\u3001\u82b1\u5377\u79d1\u6280  <\/p><p>\u53c2\u8003\u94fe\u63a5<a href=\"https:\/\/www.kxxzz.com\/xx\/440.html\">https:\/\/www.kxxzz.com\/xx\/440.html<\/a><\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>\uff08MPLS \u548c IPLC \u7684\u533a\u522b\uff09<\/p>\n\n\n\n<p>\u53d7\u5230\u6761\u4ef6\u5236\u7ea6\u6bd4\u8f83\u660e\u663e\uff0c\u9996\u5148\u4f60\u56fd\u5185\u670d\u52a1\u5668\u7684ISP\u5bf9\u96a7\u9053\u4e0d\u592a\u654f\u611f\uff0c\u4e5f\u5c31\u662fqos\u7b49\u7ea7\u5e76\u4e0d\u9ad8\uff0c\u800c\u4e14\u4f60\u56fd\u5185\u5230\u4f60\u56fd\u5916\u843d\u5730\u7684\u7269\u7406\u8ddd\u79bb\u5c3d\u53ef\u80fd\u8fd1\u4e00\u4e9b\uff0c\u5ef6\u8fdf\u80fd\u63a7\u5236\u572830ms\u4ee5\u5185\uff0c\u4e0d\u7136\u4f53\u9a8c\u4e0d\u4f1a\u592a\u597d\u3002\u53e6\u5916CPU\u9650\u5236\u4e0d\u8981\u592a\u6b7b\uff0c\u6bd5\u7adf\u6253\u96a7\u9053\u4f60\u5f97\u52a0\u5bc6\u7b97\u6cd5\u7684\u652f\u6491\uff0ccpu\u592a\u8fa3\u9e21\u5c31\u8dd1\u4e0d\u6ee1\u4e86\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u6587\u7ae0\u76ee\u5f55<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d98695a30e9\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d98695a30e9\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/umcro.com\/?p=288\/#%E4%B8%80%EF%BC%9A%E9%9C%80%E8%A6%81%E5%87%86%E5%A4%87%E7%9A%84\" title=\"\u4e00\uff1a\u9700\u8981\u51c6\u5907\u7684\">\u4e00\uff1a\u9700\u8981\u51c6\u5907\u7684<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/umcro.com\/?p=288\/#%E4%BA%8C%EF%BC%9A%E8%AE%BE%E7%BD%AE%E6%95%99%E7%A8%8B\" title=\"\u4e8c\uff1a\u8bbe\u7f6e\u6559\u7a0b\">\u4e8c\uff1a\u8bbe\u7f6e\u6559\u7a0b<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/umcro.com\/?p=288\/#21_%E5%BB%BA%E7%AB%8B%E5%9B%BD%E5%86%85%E5%92%8C%E5%9B%BD%E5%A4%96%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%97%B4%E7%9A%84%E9%9A%A7%E9%81%93\" title=\"2.1&nbsp;\u5efa\u7acb\u56fd\u5185\u548c\u56fd\u5916\u670d\u52a1\u5668\u95f4\u7684\u96a7\u9053\">2.1&nbsp;\u5efa\u7acb\u56fd\u5185\u548c\u56fd\u5916\u670d\u52a1\u5668\u95f4\u7684\u96a7\u9053<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/umcro.com\/?p=288\/#2%E5%AE%89%E8%A3%85proxmox\" title=\"2.\u5b89\u88c5proxmox\">2.\u5b89\u88c5proxmox<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/umcro.com\/?p=288\/#3_%E5%81%9A%E8%B7%AF%E7%94%B1%E7%AD%96%E7%95%A5\" title=\"3. \u505a\u8def\u7531\u7b56\u7565\">3. \u505a\u8def\u7531\u7b56\u7565<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/umcro.com\/?p=288\/#4_%E8%A1%A5%E5%85%85%E8%AF%B4%E6%98%8E\" title=\"4. \u8865\u5145\u8bf4\u660e\">4. \u8865\u5145\u8bf4\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/umcro.com\/?p=288\/#%E4%B8%89%EF%BC%9A%E5%A6%82%E6%9E%9C%E6%B2%A1%E6%9C%89%E7%8B%AC%E7%AB%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%80%8E%E4%B9%88%E5%8A%9E\" title=\"\u4e09\uff1a\u5982\u679c\u6ca1\u6709\u72ec\u7acb\u670d\u52a1\u5668\u600e\u4e48\u529e\">\u4e09\uff1a\u5982\u679c\u6ca1\u6709\u72ec\u7acb\u670d\u52a1\u5668\u600e\u4e48\u529e<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/umcro.com\/?p=288\/#31_%E5%AE%89%E8%A3%85docker\" title=\"3.1&nbsp;\u5b89\u88c5docker\">3.1&nbsp;\u5b89\u88c5docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/umcro.com\/?p=288\/#2_%E5%88%9B%E5%BB%BAdocker%E7%BD%91%E7%BB%9C\" title=\"2. \u521b\u5efadocker\u7f51\u7edc\">2. \u521b\u5efadocker\u7f51\u7edc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/umcro.com\/?p=288\/#3%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%AE%B9%E5%99%A8\" title=\"3.\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668\">3.\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%B8%80%EF%BC%9A%E9%9C%80%E8%A6%81%E5%87%86%E5%A4%87%E7%9A%84\"><\/span>\u4e00\uff1a\u9700\u8981\u51c6\u5907\u7684<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>1. \u56fd\u5185\u670d\u52a1\u5668\u4e00\u53f0\uff0c\u5e26\u5bbd\u6700\u597d\u5927\u70b9<br>2. \u56fd\u5916\u843d\u5730\u7528<a href=\"https:\/\/www.kxxzz.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">vps<\/a>\u4e00\u53f0<br>3. \u4f60\u5f97\u4f1a\u73a9kvm\uff0c\u4f1a\u7528esxi\/proxmox\u4e5f\u662f\u6781\u597d\u7684<br>4. \u4f60\u5f97\u77e5\u9053iptable\u548c\u7b56\u7565\u8def\u7531\u7684\u57fa\u7840<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BA%8C%EF%BC%9A%E8%AE%BE%E7%BD%AE%E6%95%99%E7%A8%8B\"><\/span>\u4e8c\uff1a\u8bbe\u7f6e\u6559\u7a0b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"21_%E5%BB%BA%E7%AB%8B%E5%9B%BD%E5%86%85%E5%92%8C%E5%9B%BD%E5%A4%96%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%97%B4%E7%9A%84%E9%9A%A7%E9%81%93\"><\/span>2.1&nbsp;\u5efa\u7acb\u56fd\u5185\u548c\u56fd\u5916\u670d\u52a1\u5668\u95f4\u7684\u96a7\u9053<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>&nbsp; &nbsp; \u53ef\u4ee5\u7528wireguard\u6216n2n\uff0c\u4f46\u4e00\u5b9a\u662f\u89812\u5c42\u62163\u5c42\u7684\u7f51\u7edc\uff0c\u4e0d\u80fd\u662ffrp\u4e4b\u7c7b\u7aef\u53e3\u6253\u6d1e\u7684\u4e1c\u897f\uff0c\u4e5f\u5c31\u662f\u8981\u5efa\u7acb\u4e00\u4e2a\u865a\u62df\u5c40\u57df\u7f51\uff0c\u8ba9\u56fd\u5185\u548c\u56fd\u5916\u4e24\u53f0\u670d\u52a1\u5668\u80fd\u5728\u4e00\u4e2a\u7f51\u6bb5\u4e0b\uff0c\u8fd9\u91cc\u5efa\u8bae\u7528wireguard\uff0c\u52a0\u5bc6\u5f3a\u5ea6\u9ad8\u4e00\u4e9b\u3002zerotier\u5e94\u8be5\u4e5f\u53ef\u4ee5\u73a9\uff0c\u4f46\u5b89\u5168\u6027\u6211\u4e0d\u6e05\u695a\uff0c\u5982\u679c\u8981\u7528\uff0c\u4f60\u6700\u597d\u987a\u624b\u90e8\u7f72\u4e00\u4e0bmoon\u8282\u70b9\u52a0\u901f\u4e00\u4e0b\u3002\u8fd9\u4e2a\u5e94\u8be5\u4e0d\u7528\u622a\u56fe\u8bf4\u660e\uff0c\u4e0d\u61c2\u7684\u53bbwireguard\u770b\u6559\u7a0b\u3002<br>&nbsp; &nbsp; \u552f\u4e00\u8981\u8bf4\u660e\u7684\u662f\uff0c\u4f60\u5f97\u5728\u56fd\u5916\u7684\u670d\u52a1\u5668\u4e0a\u5f00\u542fip\u8f6c\u53d1\uff0c\u5bf9\u8fd9\u4e2a\u5b50\u7f51\u505a\u4e00\u4e2aMASQUERADE\u8f6c\u53d1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"1\" &gt; \/proc\/sys\/net\/ipv4\/ip_forward\n\niptables -t nat -A POSTROUTING -s 10.128.0.0\/16 ! -d 10.128.0.0\/16 -m comment --comment \"wireguard\" -j MASQUERADE<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2%E5%AE%89%E8%A3%85proxmox\"><\/span>2.\u5b89\u88c5proxmox<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>&nbsp;\u5728\u56fd\u5185\u670d\u52a1\u5668\u4e0a\uff0c\u5b89\u88c5\u4e00\u4e2aproxmox\uff0c\u7136\u540e\u5f00\u51e0\u4e2a\u5c0f\u9e21\uff0c\u6ce8\u610f\u7ed9\u8fd9\u4e9b\u5c0f\u9e21\u5206\u914dvmbr1\u7684\u7f51\u7edc\uff0cvmbr0\u5c31\u8fd8\u662f\u505a\u666e\u901a\u7684\u4fa8\u63a5\u5230eth0\u63a5\u53e3\u5c31\u597d\uff0c\u8fd9\u4e2a\u4e0d\u7528\u7406\u4f1a\uff0c\u6211\u4eec\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u4e0d\u4f7f\u7528\u5230\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/43489b4c850f1b3ced7f31e427ac4707.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/43489b4c850f1b3ced7f31e427ac4707.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_%E5%81%9A%E8%B7%AF%E7%94%B1%E7%AD%96%E7%95%A5\"><\/span>3. \u505a\u8def\u7531\u7b56\u7565<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>&nbsp; &nbsp; \u6700\u540e\u5728\u56fd\u5185\u670d\u52a1\u5668\u4e0a\uff0c\u505a\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u7b56\u7565\u8def\u7531\uff0c\u8bb0\u5f97\u8981\u5f00\u542fip\u8f6c\u53d1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\techo \"1\" &gt; \/proc\/sys\/net\/ipv4\/ip_forward\n<\/pre>\n\n\n\n<p>&nbsp; &nbsp; \u7136\u540e\u6807\u8bb0vmbr1\u7f51\u7edc\u7684\u5730\u5740\uff0c\u8bbe\u7f6e\u9ed8\u8ba4\u8def\u7531\uff0c\u8fd9\u91cc\u662f10.10.10.0\/24<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ip rule add from 10.10.10.0\/24 lookup 10\nip route add default via 10.128.0.6 table 10<\/pre>\n\n\n\n<p>&nbsp; &nbsp; \u7136\u540e\u505a\u4e00\u4e2a\u8f6c\u53d1\uff0c\u628a\u8fd9\u4e2a\u5b50\u7f51\u7684\u6d41\u91cf\u90fd\u4ece\u4f60\u7684wireguard\u63a5\u53e3\u51fa\u53bb<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">iptables -t nat -A POSTROUTING -s 10.10.10.0\/24 ! -d 10.10.10.0\/24 -o wg0 -j MASQUERADE<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_%E8%A1%A5%E5%85%85%E8%AF%B4%E6%98%8E\"><\/span>4. \u8865\u5145\u8bf4\u660e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>&nbsp; &nbsp; \u5b8c\u6210\u4e0a\u8ff03\u6b65\u4e4b\u540e\uff0c\u5176\u5b9e\u4f60\u7684\u5c0f\u9e21\u5df2\u7ecf\u80fd\u51fa\u53bb\u4e86\u3002\u4f46\u662f\u4f60\u8fd8\u5f97\u5f00\u4e2a\u7aef\u53e3\u65b9\u4fbf\u4f60\u8fde\u63a5\u5c0f\u9e21\u7684ssh\u4e0d\u662f\uff1f\u4f60\u4e0d\u53ef\u80fd\u603b\u662f\u7528proxmox\u7684\u63a7\u5236\u53f0\u7684\u3002\u6240\u4ee5\u4f60\u8981\u628a\u76ee\u6807\u5c0f\u9e21\u7684ip\u518d\u7ed9\u5b9a\u4e2a\u8def\u7531\u8868\uff0c\u4e0d\u7136\u4f60\u505a\u7aef\u53e3\u8f6c\u53d1\u65f6\uff0c\u8fd9\u53f0\u5c0f\u9e21\u7684ip\u9ed8\u8ba4\u662f\u8d70wg0\u63a5\u53e3\u7684\u8def\u7531\u8868\u3002 \u5728\u6211\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u7684vmbr1\u5728\u6bcd\u9e21\u7684ip\u662f60\u7ed3\u5c3e\uff0c\u5c0f\u9e21\u7684ip\u662f100\u7ed3\u5c3e\uff0c\u6240\u4ee5\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u5c0f\u9e211\nip route add 10.10.10.100 via 10.10.10.60 table 10 #node1<\/pre>\n\n\n\n<p>\u7136\u540e\u4f60\u518d\u505a\u4e2a\u7aef\u53e3\u8f6c\u53d1\u5230\u8fd9\u53f0100\u5c0f\u9e21\u768422\u7aef\u53e3\u5c31\u597d\u4e86\u3002\u53e6\u5916\u518d\u5206\u914d\u51e0\u4e2a\u7aef\u53e3\u7ed9\u8fd9\u4e2a\u5c0f\u9e21\u7528\u3002\u6709\u5bcc\u88d5ip\u7684\u540c\u5b66\u8bf7\u76f4\u63a5\u7ed9ip<br><br><strong>&nbsp; &nbsp; \u81f3\u6b64\uff0c\u4f60\u5c31\u53ef\u4ee5\u901a\u8fc7ssh\u8fde\u63a5\u4f60\u56fd\u5185\u670d\u52a1\u5668\u5bf9\u5e94\u5c0f\u9e2122\u7aef\u53e3\uff0c\u5b9e\u73b0\u7c7b\u4f3ciplc\u7684\u6548\u679c\u3002<\/strong>&nbsp;\u5b9e\u9645\u843d\u5730\u662f\u5728\u4f60\u56fd\u5916\u7684\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%B8%89%EF%BC%9A%E5%A6%82%E6%9E%9C%E6%B2%A1%E6%9C%89%E7%8B%AC%E7%AB%8B%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%80%8E%E4%B9%88%E5%8A%9E\"><\/span>\u4e09\uff1a\u5982\u679c\u6ca1\u6709\u72ec\u7acb\u670d\u52a1\u5668\u600e\u4e48\u529e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>&nbsp; &nbsp; \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<br>&nbsp; &nbsp; \u6709\u7684\u3002\u7528docker\u5c31\u597d\uff0c\u6ca1\u5fc5\u8981\u5f00\u5c0f\u9e21\u4e86\u3002<br>&nbsp; &nbsp; \u4f60\u8981\u505a\u7684\u662f\uff1a<br>1. \u627e\u4e2a\u56fd\u5185\u7f51\u7edc\u8fd8\u4e0d\u9519\u7684vps\uff0c\u6bd4\u5982\u4f60\u5c31\u4efb\u6027\u5f00\u4e2a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.kxxzz.com\/tags-etagid64558-0.html\" target=\"_blank\">ECS<\/a>\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\uff08openvpn\uff09\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<br><br>&nbsp; &nbsp; \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\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"31_%E5%AE%89%E8%A3%85docker\"><\/span>3.1&nbsp;\u5b89\u88c5docker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u7528\u4e00\u952e\u65b9\u5f0f\u6700\u9760\u8c31\uff0c\u56fd\u5185\u5efa\u8bae\u7528<a href=\"https:\/\/www.kxxzz.com\/sj\/293.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u963f\u91cc\u4e91<\/a>\u7684mirrors<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -fsSL https:\/\/get.docker.com | bash -s docker --mirror Aliyun<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_%E5%88%9B%E5%BB%BAdocker%E7%BD%91%E7%BB%9C\"><\/span>2. \u521b\u5efadocker\u7f51\u7edc<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">docker network create nat<\/pre>\n\n\n\n<p>\u521b\u5efa\u5b8c\u6ce8\u610f\u770b\u4e00\u4e0b\u8fd9\u4e2a\u7f51\u7edc\u7684ip\u6bb5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">docker network inspect nat<\/pre>\n\n\n\n<p>\u6211\u7684\u4f8b\u5b50\u4e2d\u662f172.19.0.0\/16<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/b40223c9092b6373379111e31482097d.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/b40223c9092b6373379111e31482097d.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%AE%B9%E5%99%A8\"><\/span>3.\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\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<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">docker run --net=nat -itd --name=container ubuntu<\/pre>\n\n\n\n<p>\u6700\u540e\u628a\u90a3\u5565\u7b56\u7565\u8def\u7531\u6539\u4e00\u4e0b\u5230docker\u65b0\u5efa\u7684network\u5c31\u597d\u4e86\u3002\u7b56\u7565\u8def\u7531\u770b\u7b2c\u4e8c\u4e2a\u5927\u6807\u9898\u91cc\u9762<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e2a\u6839\u672c\u5c31\u6bd4\u4e0d\u8fc7\u963f\u91cc\u4f01\u4e1a\u7f51CEN\uff0c\u5145\u5176\u91cf\u4e5f\u5c31\u662f\u7c7b\u4f3cMPLS\u7684\u73a9\u610f\u513f\uff0c\u4e0d\u8fc7\u4e5f\u80fd\u5f97\u5230\u7c7b\u4f3ciplc\u7684\u4f53\u9a8c\u3002 \u5176\u4ed6\u67e5\u770b<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/umcro.com\/?p=288\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[89],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-36","tag-89"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761<\/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:\/\/umcro.com\/?p=288\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u4e2a\u6839\u672c\u5c31\u6bd4\u4e0d\u8fc7\u963f\u91cc\u4f01\u4e1a\u7f51CEN\uff0c\u5145\u5176\u91cf\u4e5f\u5c31\u662f\u7c7b\u4f3cMPLS\u7684\u73a9\u610f\u513f\uff0c\u4e0d\u8fc7\u4e5f\u80fd\u5f97\u5230\u7c7b\u4f3ciplc\u7684\u4f53\u9a8c\u3002 \u5176\u4ed6\u67e5\u770bContinue reading\" \/>\n<meta property=\"og:url\" content=\"https:\/\/umcro.com\/?p=288\" \/>\n<meta property=\"og:site_name\" content=\"\u5927\u7897\u9762\u6761\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-18T09:44:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-27T07:45:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\" \/>\n<meta name=\"author\" content=\"Tana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tana\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/umcro.com\/?p=288\",\"url\":\"https:\/\/umcro.com\/?p=288\",\"name\":\"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761\",\"isPartOf\":{\"@id\":\"https:\/\/umcro.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/umcro.com\/?p=288#primaryimage\"},\"image\":{\"@id\":\"https:\/\/umcro.com\/?p=288#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\",\"datePublished\":\"2020-03-18T09:44:18+00:00\",\"dateModified\":\"2021-08-27T07:45:24+00:00\",\"author\":{\"@id\":\"https:\/\/umcro.com\/#\/schema\/person\/685b26ea6b27bf74312a15f00387f8f4\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/umcro.com\/?p=288\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/umcro.com\/?p=288#primaryimage\",\"url\":\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\",\"contentUrl\":\"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/umcro.com\/#website\",\"url\":\"https:\/\/umcro.com\/\",\"name\":\"\u5927\u7897\u9762\u6761\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/umcro.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/umcro.com\/#\/schema\/person\/685b26ea6b27bf74312a15f00387f8f4\",\"name\":\"Tana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/umcro.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6b1ed8e53052e1f78e94972e537f3d61?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6b1ed8e53052e1f78e94972e537f3d61?s=96&d=monsterid&r=g\",\"caption\":\"Tana\"},\"url\":\"https:\/\/umcro.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761","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:\/\/umcro.com\/?p=288","og_locale":"zh_CN","og_type":"article","og_title":"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761","og_description":"\u8fd9\u4e2a\u6839\u672c\u5c31\u6bd4\u4e0d\u8fc7\u963f\u91cc\u4f01\u4e1a\u7f51CEN\uff0c\u5145\u5176\u91cf\u4e5f\u5c31\u662f\u7c7b\u4f3cMPLS\u7684\u73a9\u610f\u513f\uff0c\u4e0d\u8fc7\u4e5f\u80fd\u5f97\u5230\u7c7b\u4f3ciplc\u7684\u4f53\u9a8c\u3002 \u5176\u4ed6\u67e5\u770bContinue reading","og_url":"https:\/\/umcro.com\/?p=288","og_site_name":"\u5927\u7897\u9762\u6761","article_published_time":"2020-03-18T09:44:18+00:00","article_modified_time":"2021-08-27T07:45:24+00:00","og_image":[{"url":"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg"}],"author":"Tana","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"Tana","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/umcro.com\/?p=288","url":"https:\/\/umcro.com\/?p=288","name":"\u81ea\u5efa\u5185\u7f51\u4e92\u8054\u96a7\u9053 - \u5927\u7897\u9762\u6761","isPartOf":{"@id":"https:\/\/umcro.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/umcro.com\/?p=288#primaryimage"},"image":{"@id":"https:\/\/umcro.com\/?p=288#primaryimage"},"thumbnailUrl":"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg","datePublished":"2020-03-18T09:44:18+00:00","dateModified":"2021-08-27T07:45:24+00:00","author":{"@id":"https:\/\/umcro.com\/#\/schema\/person\/685b26ea6b27bf74312a15f00387f8f4"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/umcro.com\/?p=288"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/umcro.com\/?p=288#primaryimage","url":"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg","contentUrl":"https:\/\/www.kxxzz.com\/d\/file\/2020-02-09\/ecb00d864834d6b89da2778ccfb82113.jpg"},{"@type":"WebSite","@id":"https:\/\/umcro.com\/#website","url":"https:\/\/umcro.com\/","name":"\u5927\u7897\u9762\u6761","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/umcro.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/umcro.com\/#\/schema\/person\/685b26ea6b27bf74312a15f00387f8f4","name":"Tana","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/umcro.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6b1ed8e53052e1f78e94972e537f3d61?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6b1ed8e53052e1f78e94972e537f3d61?s=96&d=monsterid&r=g","caption":"Tana"},"url":"https:\/\/umcro.com\/?author=1"}]}},"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/umcro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=288"}],"version-history":[{"count":2,"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":291,"href":"https:\/\/umcro.com\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions\/291"}],"wp:attachment":[{"href":"https:\/\/umcro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umcro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umcro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}