ZeroTier is a solution that provides both VPN and SD-WAN capabilities and it makes it easy to manage your network. You can enjoy its flexibility and avoid hardware costs associated with enterprise solutions. There are several other features and benefits associated with ZeroTier, including:

  • Its’s Easy to set up and use – You can set up ZeroTier in minutes with remote using its automated deployment.
  • It’s Flexible – ZeroTier emulates Layer 2 Ethernet with multipath, multicast, and bridging capabilities. It’s dynamic and flexible solution.
  • Very secure – With its zero-trust networking approach, you get scalable security with 256-bit end-to-end encryption.
  • It has good performance – With ZeroTier you get good performance

ZeroTier offers several editions for its users. The editions are:

  • Open-source: this is a free and self-hosted controller for non-commercial use.
  • Basic: Free / ZeroTier Hosted Controller with limited features. Mostly used for a home lab, remote access, tunnelling and other simple networking cases.
  • Professional: Here you only pay for what you need. Used by developers, IT, technology professionals, startups, SMBs, and product R&D.
  • Enterprise: For high-volume VPN, IoT, embedded networking, multi & hybrid cloud, IaC, and Commercial Use.

Today, we will learn how to set up and use ZeroTier VPN Server. We will see how you can connect two devices over ZeroTier. We will then test the connection using the pingcommand.

1. Create the ZeroTier network

We will begin by creating the ZeroTier network. Remember this is free as no credit card is required. Visit the ZeroTier website and create an account.

ZeroTier VPN Server

Sign up and create your first network here.

ZeroTier VPN Server 1

Now you will have a network created with a random ID as well as a random name.

ZeroTier VPN Server 2

You can modify this network as desired by clicking on it.

ZeroTier VPN Server 3

You can set the desired name and make other configurations as desired. You can scroll down and see the members’ panel. Currently, we have nothing added.

2. Install ZeroTier app on Your Device

Now on any device, you want to use ZeroTier, you need to install it. This can be done by downloading the packages from the official ZeroTier downloads page.

On this page, we have Linux, Windows, macOS, iOS, Android, FreeBSD and NAS packages. In this guide, I will demonstrate how to install the ZeroTier app on Linux.

Use the command:

##If you Have GPG installed:
curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi

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

Once the package has been installed, it stores files at /var/lib/zerotier-one/. So we will create a symbolic link for the CLI tool:

sudo ln -sf /var/lib/zerotier-one/zerotier-cli /usr/bin/zerotier-cli

Once created, verify if it is working:

$ sudo zerotier-cli info
200 info e7f33c71da 1.10.2 ONLINE

For Windows, macOS, iOS and Android, you will have a desktop application which you can easily use.

3. Join your first ZeroTier network

Now you can add the devices to the created network. First copy the Network ID of the network from the ZeroTier web. For example df78bf9436d46af6. This will be required when you add each device to the network.

To add a device, proceed as shown:

  • On macOS
ZeroTier VPN Server 7

Provide the Network ID

ZeroTier VPN Server 8
  • On Windows
ZeroTier VPN Server 9

Provide your Network ID

ZeroTier VPN Server 10
  • On Mobile device
ZeroTier VPN Server 11

Provide the Network ID

ZeroTier VPN Server 112
  • On Linux(command line)
sudo zerotier-cli join af78bf9436d46af6
##OR
sudo /usr/sbin/zerotier-one -q join af78bf9436d46af6

4. Authorize your device to ZeroTier network

Now you need to allow your device to connect to the ZeroTier VPN network, otherwise, the devices will say “Access Denied

For example on Linux:

$ sudo zerotier-cli listnetworks
200 listnetworks <nwid> <name> <mac> <status> <type> <dev> <ZT assigned ips>
200 listnetworks ***********  f6:90:22:d2:54:2a ACCESS_DENIED PRIVATE zthnhgx7wa -

Now on the ZeroTier web, you will see the device appear as shown in the Members panel. Verify that the Address matches the address of your client.

Give it a name and check the “Auth?” box to allow it to connect.

ZeroTier VPN Server 5

Once the device is allowed, the status will change from “Access Denied” to “OK“. For example on Linux:

$ sudo zerotier-cli listnetworks
200 listnetworks <nwid> <name> <mac> <status> <type> <dev> <ZT assigned ips>
200 listnetworks af78bf9436d46af6 computingforgeeks_net f6:90:22:d2:54:2a OK PRIVATE zthnhgx7wa 192.168.195.59/24

5. Test ZeroTier VPN Server

To test if the VPN server is working as desired, you will add another device using a similar process as above. Once you have the two devices, obtain the IP of the second one and try pinging it.

ZeroTier VPN Server 6

These managed IPs, are different from the IPs of your network. To test if everything is working as desired, we will run the ping command as shown:

ZeroTier VPN Server 12

Voila!

Now you are set to establish connections between devices across your organization as well as offer protection or mask users against untrusted networks. I hope this was important to you.

See more:

LEAVE A REPLY

Please enter your comment!
Please enter your name here