{"id":142,"date":"2019-08-17T12:26:23","date_gmt":"2019-08-17T04:26:23","guid":{"rendered":"http:\/\/lst.wting.me\/?p=142"},"modified":"2025-05-17T19:02:55","modified_gmt":"2025-05-17T11:02:55","slug":"zerotier-one%e9%85%8d%e7%bd%aemoon","status":"publish","type":"post","link":"https:\/\/lst.wting.top\/?p=142","title":{"rendered":"ZeroTier-One\u914d\u7f6emoon"},"content":{"rendered":"\n<p>\u8f6c\u81ea\uff1a <a href=\"https:\/\/blog.csdn.net\/coldboy258\/article\/details\/93133860\">https:\/\/blog.csdn.net\/coldboy258\/article\/details\/93133860<\/a> <\/p>\n\n\n\n<p>\u4f7f\u7528ZeroTier-One\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86,\u4f46\u7531\u4e8e\u516c\u7528\u8282\u70b9,\u6709\u65f6\u4e0d\u7a33\u5b9a,\u800c\u53c8\u6ca1\u6709moon,\u6240\u4ee5\u4e00\u76f4\u6ca1\u6709\u7528\u5b83\u505a\u4e3a\u5185\u7f51\u7684\u4e3b\u8981\u4f7f\u7528\u5de5\u5177.<\/p>\n\n\n\n<p>\u6b63\u597d\u6709\u70b9\u65f6\u95f4,&nbsp;\u5c31\u67e5\u4e86\u4e0b\u8d44\u6599,\u628a\u5404\u8282\u70b9\u7684moon\u90fd\u914d\u7f6e\u597d\u4e86,&nbsp;.\u671f\u95f4\u8fd8\u662f\u9047\u5230\u6ee1\u591a\u95ee\u9898\u7684,&nbsp;\u6240\u4ee5\u5c31\u5728\u6b64\u5904\u5c06\u5176\u4e2d\u9047\u5230\u7684\u95ee\u9898\u548c\u5751\u70b9\u8bb0\u5f55\u4e0b\u6765,\u4ee5\u4f9b\u5927\u5bb6\u53c2\u8003..<\/p>\n\n\n\n<p>\u8bf4\u660e\u4e00\u4e0b, moon\u7684\u642d\u5efa\u662f\u4e3a\u4e86\u8865\u5145\u6839\u8282\u70b9\u5728\u56fd\u5916,\u901f\u5ea6\u6162,&nbsp;\u4e14\u4e0d\u7a33\u5b9a\u7684\u4e00\u4e2a\u8865\u5145\u65b9\u6848,&nbsp;\u4ee5\u4fbf\u4f7fzerotier\u80fd\u5728\u5404\u79cd\u60c5\u51b5\u90fd\u80fd\u7a33\u5b9a\u8fd0\u884c\u7684\u4e00\u79cd\u4fdd\u969c.&nbsp;\u7531\u4e8e\u6211\u7684moon\u662f\u642d\u5efa\u5728linux\u73af\u5883\u4e0b,&nbsp;\u6240\u4ee5\u6b64\u5904\u5747\u4ee5linux\u73af\u5883\u4e3a\u51c6,\u5176\u5b83\u5e73\u53f0\u65b9\u5f0f\u7c7b\u4f3c.<\/p>\n\n\n\n<p>\u5b89\u88c5 moon,zerotier\u5b98\u65b9\u63d0\u4f9b\u4e86\u6bd4\u8f83\u65b9\u4fbf\u7684\u5b89\u88c5\u65b9\u5f0f,\u4e00\u6761\u547d\u4ee4\u5373\u53ef\u5b8c\u6210:<br>\n&nbsp; &nbsp; &nbsp; &nbsp;curl -s https:\/\/install.zerotier.com\/ | sudo bash<\/p>\n\n\n\n<p>&nbsp;2.\u751f\u6210moon\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>cd \/var\/lib\/zerotier-one&nbsp;&nbsp;#\u5b89\u88c5\u597dzerotier\u540e,\u81ea\u52a8\u4f1a\u5b89\u88c5\u5230\u6b64\u76ee\u5f55<\/p>\n\n\n\n<p>sudo zerotier-idtool initmoon identity.public &gt; moon.json&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#\u8be5\u547d\u4ee4\u5c06id\u6587\u4ef6\u8f6c\u6362\u4e3a\u80fd\u7528\u4e8e\u914d\u7f6e\u7684json<\/p>\n\n\n\n<ol>\n<li>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6moon.json\uff0c\u4e3b\u8981\u662f\u6dfb\u52a0\u516c\u7f51IP\uff0c\u4fee\u6539\u5185\u5bb9\u5982\u4e0b,&nbsp;9993\u662f\u9ed8\u8ba4\u7aef\u53e3<\/li>\n<\/ol>\n\n\n\n<p>&#8220;stableEndpoints&#8221;: [ &#8220;23.23.23.23\/9993&#8221; ]<\/p>\n\n\n\n<p>\u6ce8:23.23.23.23\u4e3a\u516c\u7f51ip, \u4e00\u5b9a\u8981\u914d\u7f6e\u6b63\u786e,Zerotier\u4f9d\u9760\u6b64\u914d\u7f6e\u53bb\u8fde\u63a5moon.\u540e\u9762\u7684\u7aef\u53e3\u82e5\u6ca1\u6709\u6539\u53d8\u5219\u9ed8\u8ba4\u90fd\u662f9993\u7aef\u53e3,&nbsp;\u4e14\u662fUDP\u534f\u8bae\u7684,&nbsp;\u6b64\u5904\u5728\u9632\u706b\u5899\u4e0a\u9700\u8981\u5f00\u653eUDP,\u5426\u5219\u662f\u8fde\u63a5\u4e0d\u4e0aMoon\u7684.<\/p>\n\n\n\n<p>\u8be5\u914d\u7f6e\u91cc\u9762,\u6709\u4e00\u4e2aid\u5b57\u6bb5,10\u4e2a\u5b57\u7b26,\u5982: [&#8220;id&#8221;: &#8220;18fasd2319&#8221;],&nbsp;&nbsp;\u5c31\u662fmoon\u7684id,&nbsp;\u5728\u5ba2\u6237\u7aef\u8fde\u63a5\u65f6,\u9700\u8981\u7528\u5230\u5b83.<\/p>\n\n\n\n<p>4.\u751f\u6210moon\u6587\u4ef6<\/p>\n\n\n\n<p>sudo zerotier-idtool genmoon moon.json&nbsp;<\/p>\n\n\n\n<p>\u6267\u884c\u8be5\u547d\u4ee4\u540e,\u4f1a\u5728\u5728\/var\/lib\/zerotier-one\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a\u7c7b\u4f3c00000018fasd2319.moon\u7684\u6587\u4ef6..\u8fd9\u4e2a\u6587\u4ef6\u975e\u5e38\u91cd\u8981,\u6240\u6709\u7684\u5ba2\u6237\u7aef\u8981\u8fde\u63a5\u4e0amoon\u90fd\u662f\u4f9d\u9760\u8be5\u6587\u4ef6\u5173\u8054\u7684..<\/p>\n\n\n\n<p>5.\u4f7fmoon\u914d\u7f6e\u6587\u4ef6\u751f\u6548:<\/p>\n\n\n\n<p>\u5728\/var\/lib\/zerotier-one\u76ee\u5f55\u4e0b,\u65b0\u5efa\u4e00\u4e2a&nbsp;moons.d \u6587\u4ef6\u5939\uff0c\u5e76\u5c06\u521a\u751f\u6210\u7684moon\u914d\u7f6e\u6587\u4ef6\u653e\u5230\u8be5\u6587\u4ef6\u5939\u4e0b<\/p>\n\n\n\n<p>mv 00000018fasd2319.moon moons.d\/<\/p>\n\n\n\n<ol>\n<li>\u91cd\u65b0\u542f\u52a8moon\u670d\u52a1\u5668,\u7531\u4e8e\u4f7f\u7528\u547d\u4ee4\u5b89\u88c5\u65f6\u4f1a\u81ea\u52a8\u6ce8\u518c\u4e3a\u670d\u52a1,\u6240\u4ee5\u53ef\u4ee5\u4f9d\u9760\u4ee5\u4e0b\u547d\u4ee4\u5b8c\u6210\u542f\u52a8\u6216\u91cd\u542f<\/li>\n<\/ol>\n\n\n\n<p>service zerotier-one restart&nbsp; &nbsp;#(\u670d\u52a1\u91cd\u542f\u547d\u4ee4)<\/p>\n\n\n\n<p>\/etc\/init.d\/zerotier-one restart&nbsp; #(\u670d\u52a1\u91cd\u542f\u547d\u4ee4)<\/p>\n\n\n\n<p>service zerotier-one start #(\u670d\u52a1\u542f\u52a8\u547d\u4ee4)<\/p>\n\n\n\n<p>zerotier-one -d #\u6216\u76f4\u63a5\u7a0b\u5e8f\u542f\u52a8<\/p>\n\n\n\n<p>\u7ecf\u8fc7\u4ee5\u4e0a\u914d\u7f6e,\u670d\u52a1\u5668\u4e0a\u7684moon\u5373\u914d\u7f6e\u5e76\u5e94\u7528\u5b8c\u95ed.<\/p>\n\n\n\n<p>\u5ba2\u6237\u7aef\u8fde\u63a5\u5e76\u4f7f\u7528\u670d\u52a1\u5668\u4e0a\u7684Moon<br>\n\u63a5\u4e0b\u6765\u5c31\u9700\u8981\u5728\u5404\u5ba2\u6237\u7aefzerotier\u4e0a\u914d\u7f6e,\u5e76\u8fde\u63a5\u6b64\u670d\u52a1\u5668,<\/p>\n\n\n\n<p>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b8c\u6210.<\/p>\n\n\n\n<p>\u65b9\u6cd51.<br>\nLinux:&nbsp; \u76f4\u63a5\u5728zerotier\u76ee\u5f55\u4e0b,\u521b\u5efamoons.d\u6587\u4ef6\u5939,\u5e76\u4e14\u5c06\u751f\u6210\u768400000018fasd2319.moon\u6587\u4ef6\u62f7\u5165,\u5e76\u91cd\u542f\u670d\u52a1\u5373\u53ef.<\/p>\n\n\n\n<p>Windows(10):\u7531\u4e8e\u5927\u90e8\u5206\u4eba\u5e38\u7528\u73af\u5883\u90fd\u662fwindows,\u6240\u4ee5\u6b64\u5904\u7740\u91cd\u5bf9\u5728windows\u73af\u5883\u4e0b\u7684\u914d\u7f6e\u8bf4\u660e\u4e0b:<\/p>\n\n\n\n<p>\u6253\u5f00\u670d\u52a1\u7a0b\u5e8fservices.msc, \u627e\u5230\u670d\u52a1&#8221;ZeroTier One&#8221;, \u5e76\u4e14\u5728\u5c5e\u6027\u5185\u627e\u5230\u8be5\u670d\u52a1\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84,\u6211\u7684\u73af\u5883\u4e0b\u4e3aC:\\ProgramData\\ZeroTier\\One\\zerotier-one_x64.exe, \u6253\u5f00\u8be5\u6587\u4ef6\u5939, \u5e76\u4e14\u5728\u5176\u4e0b\u5efa\u7acbmoons.d\u6587\u4ef6\u5939,\u7136\u540e\u5c06moon\u670d\u52a1\u5668\u4e0b\u751f\u6210\u7684000xxxx.moon\u6587\u4ef6,\u62f7\u8d1d\u5230\u6b64\u6587\u4ef6\u5939\u5185..\u518d\u91cd\u542f\u8be5\u670d\u52a1\u5373\u53ef..<\/p>\n\n\n\n<p>(\u6ce8,\u6b64\u5904\u91cd\u542f\u7684\u662f\u8be5\u9879\u670d\u52a1,\u4e0d\u662f\u7535\u8111\u53f3\u4e0b\u89d2\u7684\u56fe\u6807\u7a0b\u5e8f..\u7f51\u4e0a\u5927\u591a\u8d44\u6599\u90fd\u6ca1\u6cd5\u7279\u522b\u8bf4\u660e,\u6216\u8005\u542b\u7cca\u6ca1\u8bf4\u6e05,\u751a\u81f3\u91cd\u542f\u7535\u8111\u4e4b\u7c7b\u7684\u8bf4\u6cd5\u90fd\u8bf4\u51fa\u6765\u4e86,\u6bd4\u8f83\u9a6c\u864e..\u53f3\u4e0b\u89d2\u4efb\u52a1\u680f\u7a0b\u5e8f\u8def\u5f84\u662f\u5728C:\\Program Files (x86)\\ZeroTier\\One\u76ee\u5f55\u4e0b,\u800c\u670d\u52a1\u8def\u5f84\u5374\u5e76\u975e\u5728\u8be5\u8def\u5f84,\u82e5\u5c06moons.d\u6587\u4ef6\u5939\u653e\u4e0d\u5bf9\u4f4d\u7f6e,\u662f\u65e0\u6cd5\u8fde\u4e0aMoon\u670d\u52a1\u5668\u7684.)<\/p>\n\n\n\n<p>\u65b9\u6cd52.<br>\n\u53ea\u9700\u6267\u884c\u6b64\u547d\u4ee4\u5373\u53ef,\u6b64\u5904\u9700\u8981\u8f93\u5165\u4e24\u904did:<\/p>\n\n\n\n<p>zerotier-cli orbit 18fasd2319 18fasd2319<\/p>\n\n\n\n<p>(\u6b64\u79cd\u65b9\u6cd5\u4f9d\u8d56zerotier\u7684\u6839\u670d\u52a1\u5668,\u82e5\u6839\u670d\u52a1\u5668\u8fde\u63a5\u4e0d\u4e0a,\u5219\u4f1a\u65e0\u6548,\u7531\u4e8e\u4e0d\u786e\u5b9a\u6027, \u6240\u4ee5\u672c\u4eba\u66f4\u559c\u6b22\u65b9\u6cd51..\u8fd9\u4e2a\u770b\u4e2a\u4eba\u60c5\u51b5\u800c\u5b9a,\u9002\u7528\u5c31\u597d\u2026)<\/p>\n\n\n\n<p>&nbsp;<br>\n\u8981\u9a8c\u8bc1\u662f\u5426moon\u751f\u6548,\u53ea\u9700\u8981\u5728\u5ba2\u6237\u7aefzerotier\u7a0b\u5e8f\u76ee\u5f55\u4e0b,\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef:<br>\nzerotier-cli listpeers<\/p>\n\n\n\n<p>\u82e5\u6709\u7c7b\u4f3c\u5730\u5740,\u5373\u53ef\u8bc1\u660emoon\u8fde\u63a5\u6210\u529f<\/p>\n\n\n\n<p>200 listpeers 18fasd2319&nbsp;23.23.23.23\/9994;4242;4038 224 1.2.12 MOON<\/p>\n\n\n\n<p>\u9644\u5f55:<\/p>\n\n\n\n<p>\u7531\u4e8e\u5f88\u591a\u4eba\u5bf9\u914d\u7f6e\u670d\u52a1\u7aef\u7684moon\u90fd\u4f1a\u6709\u4fee\u6539\u7aef\u53e3\u7684\u9700\u6c42,\u7b14\u8005\u4e5f\u4e0d\u4f8b\u5916,&nbsp;\u7ffb\u4e86\u5b98\u7f51\u4e0d\u5c11\u6587\u6863\u6700\u540e\u624d\u627e\u5230\u65b9\u6cd5..\u5728\u6b64\u5904\u4e00\u5e76\u8bb0\u5f55\u4e0b\u6765..\u4ee5\u4f9b\u5927\u5bb6\u53c2\u8003:<\/p>\n\n\n\n<p>\u5728\u8fd0\u884c\u7a0b\u5e8f\u540c\u7ea7\u76ee\u5f55\u4e0b\u5efa\u7acblocal.conf\u6587\u4ef6:<\/p>\n\n\n\n<p>\u6587\u4ef6\u5185\u5bb9\u914d\u7f6e\u5982\u4e0b,primaryPort\u5373\u4e3a\u60f3\u8981\u914d\u7f6e\u7684\u7aef\u53e3:<\/p>\n\n\n\n<p>{<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8220;settings&#8221;:<\/p>\n\n\n\n<p>&nbsp; &nbsp;{<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8220;primaryPort&#8221;:9994<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>local.conf&nbsp;\u5b8c\u6574\u914d\u7f6e\u793a\u4f8b\u5982\u4e0b:<\/p>\n\n\n\n<p>{<br>     &#8220;physical&#8221;: { \/* Settings that apply to physical L2\/L3 network paths. <em>\/         &#8220;NETWORK\/bits&#8221;: { \/<\/em> Network e.g. 10.0.0.0\/24 or fd00::\/32 <em>\/             &#8220;blacklist&#8221;: true|false, \/<\/em> If true, blacklist this path for all ZeroTier traffic <em>\/             &#8220;trustedPathId&#8221;: 0|!0 \/<\/em> If present and nonzero, define this as a trusted path (see below) <em>\/         } \/<\/em> ,\u2026 additional networks <em>\/     },     &#8220;virtual&#8221;: { \/<\/em> Settings applied to ZeroTier virtual network devices (VL1) <em>\/         &#8220;##########&#8221;: { \/<\/em> 10-digit ZeroTier address <em>\/             &#8220;try&#8221;: [ &#8220;IP\/port&#8221;\/<\/em>,\u2026<em>\/ ], \/<\/em> Hints on where to reach this peer if no upstreams\/roots are online <em>\/             &#8220;blacklist&#8221;: [ &#8220;NETWORK\/bits&#8221;\/<\/em>,\u2026<em>\/ ] \/<\/em> Blacklist a physical path for only this peer. <em>\/         }     },     &#8220;settings&#8221;: { \/<\/em> Other global settings <em>\/         &#8220;primaryPort&#8221;: 0-65535, \/<\/em> If set, override default port of 9993 and any command line port <em>\/         &#8220;portMappingEnabled&#8221;: true|false, \/<\/em> If true (the default), try to use uPnP or NAT-PMP to map ports <em>\/         &#8220;softwareUpdate&#8221;: &#8220;apply&#8221;|&#8221;download&#8221;|&#8221;disable&#8221;, \/<\/em> Automatically apply updates, just download, or disable built-in software updates <em>\/         &#8220;softwareUpdateChannel&#8221;: &#8220;release&#8221;|&#8221;beta&#8221;, \/<\/em> Software update channel <em>\/         &#8220;softwareUpdateDist&#8221;: true|false, \/<\/em> If true, distribute software updates (only really useful to ZeroTier, Inc. itself, default is false) <em>\/         &#8220;interfacePrefixBlacklist&#8221;: [ &#8220;XXX&#8221;,\u2026 ], \/<\/em> Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic <em>\/         &#8220;allowManagementFrom&#8221;: &#8220;NETWORK\/bits&#8221;|null, \/<\/em> If non-NULL, allow JSON\/HTTP management from this IP network. Default is 127.0.0.1 only. <em>\/         &#8220;allowTcpFallbackRelay&#8221;: true|false \/<\/em> Allow or disallow establishment of TCP relay connections (true by default) *\/<br>     }<br> }<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br> \u00a0<br>  \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 <br> \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3aCSDN\u535a\u4e3b\u300ccoldboy258\u300d\u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 by-sa\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<br> \u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/blog.csdn.net\/coldboy258\/article\/details\/93133860<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u81ea\uff1a https:\/\/blog.csdn.net\/coldboy258\/article\/details\/93 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/posts\/142"}],"collection":[{"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lst.wting.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":3,"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/lst.wting.top\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions\/245"}],"wp:attachment":[{"href":"https:\/\/lst.wting.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lst.wting.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lst.wting.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}