top of page
Search
Writer's pictureagorbis

ZeroTier & Ubiquiti Dream Machine

Updated: Dec 24, 2023

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:

  1. Open the Unifi Network Controller.

  2. Click on the “Settings” icon in the bottom left corner of the screen.

  3. Select “Site” from the menu on the left-hand side.

  4. Click on the “Services” tab.

  5. Toggle the “Enable SSH Authentication” switch to the “On” position.

  6. 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:

  1. Download the ZeroTier installation script by running the following command:

sudo curl -s https://install.zerotier.com | sudo bash
  1. 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:

  1. Log in to your ZeroTier account and navigate to your network dashboard.

  2. Click on the “Create a Network” button and give your network a name.

  3. Click on the “Create” button to create your network.

  4. Once your network has been created, you will be provided with a network ID. Copy this ID to your clipboard.

  5. On your Unifi Dream Machine, run the following command to join the network:


sudo zerotier-cli join <network_id>
  1. Replace <network_id> with the network ID you copied in step 4.

  2. 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:


  1. Navigate to the ZeroTier configuration file by running the following command:


sudo nano /var/lib/zerotier-one/zerotier-one.conf
  1. Edit the configuration file to include your ZeroTier network ID. To do this, add the following line to the file:


networkID=<network_id>
  1. Replace <network_id> with the network ID of your ZeroTier network.

  2. 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


584 views0 comments

コメント


bottom of page