Below is the original post that walks you through the steps to rename ZeroTier interfaces. Shortly after I posted this, Grant Limberg from ZeroTier posted something that makes a lot of sense. Changing the name of the interface; more specifically removing the “zt” from the interface will have some very negative effects. He eloquently explained it better than I could so before you do this please scroll down and read his reply. I am going to make a video showing the effect renaming the ZeroTier interface will have but I couldn’t in good conscience leave this post up without adding at least this disclaimer.

If you want to make your ZeroTier interface name match the network interface naming scheme currently used on your Linux server:

Create a file called devicemap in /var/lib/zerotier-one/

You can do this with the following command:

sudo touch /var/lib/zerotier-one/devicemap

Next we will add a line in the file we just created

sudo nano /var/lib/zerotier-one/devicemap

The file will open to a blank page. Inside the file we will add two pieces of information. The network id of the ZeroTier network and what you want your interface name to be. For example I have a ZeroTier network that I created at my.zerotier.com named “remotedesktops” my network id is the long series of letters and numbers that appear next to the name. Also my Debian Linux server has a physical interface named “eth0” so I want my ZeroTier interface to be “eth1” instead of zt-247. So I will type the following line in the text editor

27ef6g78ef=eth1

Now press ctrl X and “y” to confirm to save the file.

It is possible to make these changes take effect without a reboot with this command:

systemctl restart zerotier-cli

However, I prefer a reboot for completeness.

Now reboot your machine and when you log back in and list your interfaces you should see eth1 as the ZeroTier interface (or whatever you named it). Hope this helps!

If you have problems or just want to reach out, you can now reach me! Drop a line to [email protected]

2 comments on “How to rename a ZeroTier One interface from zt… to eth0 or eth1 or anything you want!

  • Renaming your ZeroTier device to ethX is potentially very bad advice. Under the hood ZeroTier binds to every device on your machine directly. We use the zt prefix on ZeroTier devices so that it knows NOT to bind to it, and thus preventing packet feedback loops where ZeroTier will try to send a packet over its own device. This situation turns into an infinite loop while maxing out your CPU.

    On Linux, we use long, yet deterministic device names. That means any Linux machine joined to the same network will have the same device name. This allows for easier scripting over the old zt0, zt1 naming scheme as it no longer depends on the order the networks were joined on a machine. This is the same reason most Linux distributions switched to device naming schemes like enp4s0: so that network device names are deterministic and eth0/eth1, etc don’t depend on the order the system finds them.

    Grant

Leave a Reply to Grant LimbergCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.