ZeroTier & Ubiquiti Dream Machine
Updated: Aug 18
Last Tested in 2023
ZeroTier is a powerful software-defined network solution that enables secure and flexible connectivity over the Internet. It provides a virtual networking layer that can connect any device, anywhere, at any time. In this article, we will guide you through the process of installing ZeroTier on Unifi Dream Machine, a popular networking appliance that provides advanced security and routing features for small to medium-sized businesses.
Step 1: Creating a ZeroTier Account
Before we begin, you will need to create a ZeroTier account. This is a straightforward process that involves signing up on the ZeroTier website and verifying your email address. Once you have created an account, you will have access to your network dashboard, where you can create and manage virtual networks.
Step 2: Enabling SSH on Unifi Dream Machine
The next step is to enable SSH access on your Unifi Dream Machine. This will allow you to access the command-line interface of the device and execute commands remotely. To enable SSH, follow these steps:
Open the Unifi Network Controller.
Click on the “Settings” icon in the bottom left corner of the screen.
Select “Site” from the menu on the left-hand side.
Click on the “Services” tab.
Toggle the “Enable SSH Authentication” switch to the “On” position.
Enter a username and password to use for SSH access.
Step 3: Installing ZeroTier on Unifi Dream Machine
With SSH enabled, you can now connect to your Unifi Dream Machine using a terminal emulator such as PuTTY or Terminal on a Mac. Once you have established an SSH connection, follow these steps to install ZeroTier:
Download the ZeroTier installation script by running the following command:
arduinoCopy code sudo curl -s https://install.zerotier.com | sudo bash
Once the script has finished running, ZeroTier will be installed on your Unifi Dream Machine.
Step 4: Joining a ZeroTier Network
With ZeroTier installed, the next step is to join a virtual network. To do this, follow these steps:
Log in to your ZeroTier account and navigate to your network dashboard.
Click on the “Create a Network” button and give your network a name.
Click on the “Create” button to create your network.
Once your network has been created, you will be provided with a network ID. Copy this ID to your clipboard.
On your Unifi Dream Machine, run the following command to join the network:
bashCopy code sudo zerotier-cli join <network_id>
Replace <network_id> with the network ID you copied in step 4.
Once the command has been executed, your Unifi Dream Machine will be connected to the ZeroTier network.
Step 5: Configuring ZeroTier on Unifi Dream Machine
Now that your Unifi Dream Machine is connected to the ZeroTier network, you can configure ZeroTier to suit your needs. To do this, you will need to edit the ZeroTier configuration file. Follow these steps:
Navigate to the ZeroTier configuration file by running the following command:
bashCopy code sudo nano /var/lib/zerotier-one/zerotier-one.conf
Edit the configuration file to include your ZeroTier network ID. To do this, add the following line to the file:
makefileCopy code networkID=<network_id>
Replace <network_id> with the network ID of your ZeroTier network.
Save the configuration file by pressing Ctrl + X, then Y, then Enter.
Step 6: Verifying ZeroTier Connectivity
With ZeroTier configured, you can now verify that your Unifi Dream Machine is connected.
By Andrei Gorbis