Skip to content

Install ZeroTier on your Linux VM & join your private network.

Assign: Yang Jun Date: May 12, 2021 2:30 PM (GMT+8) → 4:30 PM Status: Completed

Internship Activity Kanban

How to install ZeroTier on Linux VM?

Reference: https://www.zerotier.com/download/

The installation of ZeroTier on Linux can be done with one line of command:

curl -s https://install.zerotier.com | sudo bash

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled.png

*Note the ZeroTier address that was generated.

How to join the private network?

From the command line, simply type sudo zerotier-cli join NetworkID with NetworkID being the 16-digit network ID of the network you wish to join:

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%201.png

You will receive a 200 join OK message, confirming that the ZeroTier service on your server has understood the command. If you do not, double-check the ZeroTier Network ID you entered.

Since we created a private network, we now need to authorize the Linux VM.

Step 1: Go to the ZeroTier Web Console. We can now see that the Online Members has changed from 0 to 1, indicating that the Linux VM has successfully joined the private network. However, the Authorized Members remains as 0 as we have yet to authorize the Linux VM.

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%202.png

Step 2: Select the network and scroll down till you reach the Members section. You should spot an entry marked as Online, with the same address that you noted earlier.

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%203.png

Step 3: In the first column marked Auth?, tick the box to authorize the Linux VM to join the network. The ZeroTier Controller will allocate an IP address to the VM from the range the next time it calls the SDN.

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%204.png

Allocating the IP address may take a moment. After a while, you can see that it has been assigned a private IP address.

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%205.png

To double check that the authorization was successful, return back to the ZeroTier Web Console. We can see that the number of Authorized Members has changed from 0 to 1.

6%20Install%20ZeroTier%20on%20your%20Linux%20VM%20&%20join%20your%20pr%200386500313d146e689f5a9ccb6a47f6d/Untitled%206.png

With that, we have connected the Linux VM to the private software-defined network.