In my previous post I showed how to install ZeroTier on the EdgeRouter, after installing we need to rename the ZeroTier interface to ethx interface to show up in EdgeOS.

ZeroTier on a Ubiquiti EdgeRouter
With the new EdgeOS version 2 firmware for the EdgeRouter it is now possible to install ZeroTier on this router.

Now I adopted EdgeOS (which is basically VyOS/Vyatta running on the EdgeRouter) to support ZeroTier from the native CLI with tab completion.

Demo

Install

I have tested this only with EdgoOS version 2.0.6, I have not tested it with other versions of EdgeOS. So be warned especially with 1.x version.

Install ZeroTier as described in my previous post but skip the interface mapping.

After that create a backup of the Interface.pm file. This is the only file that wil be modified so it is good to keep a backup.

root@edgerouter:~# cp /opt/vyatta/share/perl5/Vyatta/Interface.pm /opt/vyatta/share/perl5/Vyatta/Interface.pm.backup

Download the tgz from https://github.com/dkruyt/resources/raw/master/zerotier-edgeos.tgz

Extract all files to their absolute path.

root@edgerouter:/# tar -C / -xvzf /home/admin/zerotier-edgeos.tgz
opt/
opt/vyatta/
opt/vyatta/share/
opt/vyatta/share/vyatta-op/
opt/vyatta/share/vyatta-op/templates/
opt/vyatta/share/vyatta-op/templates/disconnect/
opt/vyatta/share/vyatta-op/templates/disconnect/zerotier/
opt/vyatta/share/vyatta-op/templates/disconnect/zerotier/node.tag/
opt/vyatta/share/vyatta-op/templates/disconnect/zerotier/node.tag/node.def
opt/vyatta/share/vyatta-op/templates/disconnect/zerotier/node.def
opt/vyatta/share/vyatta-op/templates/connect/
opt/vyatta/share/vyatta-op/templates/connect/zerotier/
opt/vyatta/share/vyatta-op/templates/connect/zerotier/node.tag/
opt/vyatta/share/vyatta-op/templates/connect/zerotier/node.tag/node.def
opt/vyatta/share/vyatta-op/templates/connect/zerotier/node.def
opt/vyatta/share/vyatta-op/templates/show/
opt/vyatta/share/vyatta-op/templates/show/zerotier/
opt/vyatta/share/vyatta-op/templates/show/zerotier/info/
opt/vyatta/share/vyatta-op/templates/show/zerotier/info/node.def
opt/vyatta/share/vyatta-op/templates/show/zerotier/peers/
opt/vyatta/share/vyatta-op/templates/show/zerotier/peers/node.def
opt/vyatta/share/vyatta-op/templates/show/zerotier/moons/
opt/vyatta/share/vyatta-op/templates/show/zerotier/moons/node.def
opt/vyatta/share/vyatta-op/templates/show/zerotier/node.def
opt/vyatta/share/vyatta-op/templates/show/zerotier/networks/
opt/vyatta/share/vyatta-op/templates/show/zerotier/networks/node.def
opt/vyatta/share/vyatta-op/templates/show/interfaces/
opt/vyatta/share/vyatta-op/templates/show/interfaces/zerotier/
opt/vyatta/share/vyatta-op/templates/show/interfaces/zerotier/node.def
opt/vyatta/share/vyatta-cfg/
opt/vyatta/share/vyatta-cfg/templates/
opt/vyatta/share/vyatta-cfg/templates/interfaces/
opt/vyatta/share/vyatta-cfg/templates/interfaces/zerotier/
opt/vyatta/share/vyatta-cfg/templates/interfaces/zerotier/node.tag/
opt/vyatta/share/vyatta-cfg/templates/interfaces/zerotier/node.tag/description/
opt/vyatta/share/vyatta-cfg/templates/interfaces/zerotier/node.tag/description/node.def
opt/vyatta/share/vyatta-cfg/templates/interfaces/zerotier/node.def
opt/vyatta/share/perl5/
opt/vyatta/share/perl5/Vyatta/
opt/vyatta/share/perl5/Vyatta/Interface.pm

Thats it, now you can use ZeroTier als0 in the CLI on the router and also it shows up correctly as a ZeroTier interface in the GUI.