ZeroTier build server moon

Foreword

Previously realized ZeroTier network penetration . However, due to ZeroTier official moon transit server in the foreign and domestic clients may occur use large delay, not even the problem of access occurs. You can build their own moon transfer server to achieve stable service.

note:

  • ZeroTier after version 1.2.4 only supports moon servers.

moon and join the virtual network installation ZeroTier

See: ZeroTier network penetration .

moon Server Configuration

  • Enter ZeroTier profile directory.

    cd /var/lib/zerotier-one
    
  • Moon.json generate a signature file.

    sudo -s
    zerotier-idtool initmoon identity.public >>moon.json
    
  • edit

    vim moon.json
    

    You can see the following information:

    moon.json
      
      {
       "id": "0123456789",
       "objtype": "world",
       "roots": [
        {
         "identity": "xxxxxxxx:0:xxxxxxxx",
         "stableEndpoints": []
        }
       ],
       "signingKey": "xxxxxxxx",
       "signingKey_SECRET": "xxxxxxxx",
       "updatesMustBeSignedBy": "xxxxxxxx",
       "worldType": "moon"
      }
        

    Note: record moon.json file id.

  • Modify information.

    Find "stableEndpoints": [].

    Adding "IPv4地址/9993"or "IPv4地址/9993","IPv6地址/9993".

    Example:

    "stableEndpoints": ["1.2.3.4/9993","2001:abcd:abcd::1/9993" ]
    
  • .Moon generate a signature file

    zerotier-idtool genmoon moon.json
    

    display:

    wrote 0000006xxxxxxxxx.moon (signed world with timestamp 15xxxxxxxxxx7)
    
  • Creating moon junction folder.

    mkdir /var/lib/zerotier-one/moods.d
    
  • Copy the signature file to a folder moods.d

    cp 0000006xxxxxxxxx.moon moons.d/
    
  • Restart ZeroTier Service

    /etc/init.d/zerotier-one restart
    

Server device connected to the moon

Automatic Configuration

  • input the command:

    sudo zerotier-cli orbit [moon.json 文件中的 id] [moon.json 文件中的 id]
    
  • Windows is a little different, you need administrator rights PowerShell input:

    zerotier-cli orbit [moon.json 文件中的 id] [moon.json 文件中的 id]
    

Manual configuration

Under each platform ZeroTier directory location:

 Windows: C:\ProgramData\ZeroTier\One
 Macintosh: /Library/Application Support/ZeroTier/One (在 Terminal 中应为 /Library/Application\ Support/ZeroTier/One)
 Linux: /var/lib/zerotier-one
 FreeBSD/OpenBSD: /var/db/zerotier-one
  • ZeroTier directory location in the corresponding system platform, create moods.d folder.

    sudo mkdir /var/lib/zerotier-one/moods.d
    
  • The moon copied to the server-generated 0000006xxxxxxxxx.moon moods.d folder.

  • Restart zerotier-one service.

    • Linux :/etc/init.d/zerotier-one restart
    • Windows :
      • Press windows key + r, open the "Run" window.
      • Enter services.msc Enter.
      • Find ZeroTier One service, right click and choose "Restart."

Detection take effect

  • Non-moon of the client, enter the command:

    zerotier-cli listpeers
    
  • Windows is a little different, you need administrator rights PowerShell input:

    zerotier-cli listpeers
    

If the following happens:

  • ID, IP address moon appear in the list server, server to prove Unicom moon.
200 listpeers <ztaddr> <path> <latency> <version> <role>
...................
200 listpeers 6xxxxxxxxx [moon IPv4地址]/60723;11450;11405 -1 1.4.6 MOON
...................

Guess you like

Origin www.cnblogs.com/Yogile/p/12642423.html