Run ZeroTier Node on VyOS router as a bare app

D
2 min readJul 22, 2022

--

Install ZeroTier node on VyOS

Login as root using sudo su command

vyos@vyos-01# sudo su
root@vyos-01: curl -s https://install.zerotier.com | sudo bash
*** Success! You are ZeroTier address [ 6cfb0f0562 ].

Once successfully installed, you’ll get a 10-symbol alpha-numeric code of your ZeroTier node.

Make it persistent

root@vyos-01:/etc# cd /var/lib
root@vyos-01:/var/lib# mv /var/lib/zerotier-one /config/scripts/
root@vyos-01:/var/lib# ln -s /config/scripts/zerotier-one

After each VyOS upgrade you’ll need to reinstall ZrtoTier and re-create the links.

Change ZeroTier default Interface name (optional)

Open the ZeroTier config file and update it to something like eth2. Make sure your ethX is not used by your VyOS already so update any other not used number by the system.

root@vyos-01:vi /var/lib/zerotier-one/devicemap
#And update this part <zerotiernetworkid>=eth2
#for example
1111a11af1=eth2

/etc/init.d/zerotier-one restart

Now to join a ZeroTier network first you obviously create a network for example here at my.zerotier.com or using your own hosted controller (here is howto), which is a 16-symbol alpha-numeric code. And then on the node, you join the network, and, on the network, you add the node(s).

root@vyos-01: zerotier-cli join 8056c2e21c000001

Before we start first we need to fix MTU on VyOS. ZeroTier by default uses MTU 2800 and the management network is often using ~1500. Modify in this command example eth1 to the network management interface (not ZT interface), where traffic from ZeroTier network will be routed to:

#Run in VyOS console in Configure mode, modify eth1 to your management network interface (not ZT interface)
set firewall options interface eth1 adjust-mss 1460

Check out my article on how to install ZeroTier Controller and ZeroTier node as a docker container on VyOS here.

--

--