Root IPs in source

Hi,

I am currently working on a project where I need to have my own roots and not rely on ZeroTier. I have my own roots setup and a new world definition distributed, everything works. Now I just need to make the whole process of installing and configuring ZeroTier easier, meaning that I am going to build my own packages for Debian. To do this an get the custom world definition I would need to change the root IP-addresses in the source code. I have looked around a bit, but going through all the files would take an insane amount of time.

So, my question is, where are the IP-addresses of the roots in the source code?

I might as well tag some people who knows the answer to this question.
@zt-grant @zt-travis

Problem solved!

The root IP-addresses are bundled together with the rest of the ‘planet’ file. It is located in the ZeroTierOne/node/Topology.cpp file as ZT_DEFAULT_WORLD in hexadecimal format. Some searching was required, but I took the IP-addresses that the command zerotier-cli peers showed and converted them to hexadecimal with a hexadecimal-to-IP online converter.

1 Like

I would be really interrested to read a bit more about your setup. How many root Servers are you running?
Also I don’t understand that you said you have already your root definition running but than you said you are still looking for the definition of them in the code. So how did you Set the root Servers in the first place? Did you use the api?

Thank you :slight_smile:

Read the manual in the meantime :wink:
Now I think I understand how you did it. I think I understand that you were just looking for a quicker way to deploy the same way you could do it on the command line by adding your roots and deleting all the others.

As of version 1.4.6 (which is what I am using) there is no built in way to add or remove the planet roots, only moons. I am looking to have a completely isolated network that doesn’t communicate with the regular ZeroTier network at all. And it is possible to create your own world definition with your own planet roots. The following article goes into how that is done: https://gotz.co/2019/02/17/mpls-over-zerotier-pt-1/

What I wanted to find was the world definition, which is stored in the planet file when you have installed ZeroTier. I needed to change it to make sure that my network would be completely isolated. And that had to be done in the source code, so before the installation package was created from the source.

Previously I have made my own world definition by creating the planet file with the help of the files that are found in ZeroTierOne/attic/world, as per the instructions in the article above, and then manually adding them to all my devices, but since I am looking at running a network with 2-5 planet roots, perhaps a few moons and possibly over 100 devices it would be much easier to just compile my own packages and then distribute those, rather than using the default packages and then manually exchanging the old planet file with my new one.

I believe that there will be an easier solution to this in the 2.x update. But until then it is a bit tricky to get everything working properly.

If you have any further questions I will do my best to answer them for you.

2 Likes

Thank you so much for taking time to explain that!

This topic was automatically closed after 14 days. New replies are no longer allowed.