Setting up a VPN easily with ZeroTier


A VPN (Virtual Private Network) aims to directly connect hosts that are not physically located in the same place. Software and encryption techniques are used for this purpose, ensuring the security of the remote connection.

A very easy way to configure a VPN is by using ZeroTier. ZeroTier is a free software/service that enables the implementation of VPNs even in environments with NAT (Network Address Translation) or firewall. No additional configuration is necessary.

The first step is to access https://my.zerotier.com and create a free account. Then, navigate to the "Networks" menu and click on "Create" to create a network.

On this screen, you will see the "Network ID" of the network. This ID will be necessary during the configuration of each host belonging to this new network. Let's now proceed with the configuration of the hosts.

The "ZeroTier" download can be done at https://www.zerotier.com/download.shtml. Supported systems include: Windows, Macintosh, iOS, Android, Linux, and others. Next, we'll cover the installation on Linux.

Linux VPS

High-performance, low-cost VPS servers. Immediate installation!

  • Unlimited reinstallations
  • DDoS Protection
  • Free backups
  • Dedicated IPv4

In a terminal, execute the following command to perform the installation:

curl -s https://install.zerotier.com | sudo bash
Now ZeroTier is installed. We need to add it to the network and authorize it to start working. This process is very simple. First, execute the command below, replacing the ID with the "Network ID" of your network.

zerotier-cli join a84ac5c10a41bf0d
If successful, you will receive the response "200 join OK". Refreshing the network page will show a new host in the member list:

Click on the checkbox "Auth?" to authorize. Again on the host, execute the command "ifconfig zt0" and you will see that the interface has received an IPv4 address automatically.

Now, just perform the same procedure on all other hosts you want to add to this virtual network. They will all receive an IPv4 address from the same network and will be able to communicate directly as if they were in the same location.

This functionality is very useful in inter-branch communication for businesses, LAN gaming with remote partners, or even in data transfer between servers not directly accessible via the internet.

If you have any difficulties, open a support ticket:
och.center/support

See you soon,
OCH