bash_cli_zt
bash_cli_zt copied to clipboard
Create your own planet file `world.bin` (After watching "Private ZeroTier Network on the Public Internet")
It is possible to create your own planet file, however this requires editing the ZeroTire sources and compiling your own world.bin
file, and later including it in the .deb, .rpm,
... private package of the ZeroTire distribution.
Here are the steps I used to create my own Planets file.
- Download ZeroTier from Github:
git clone https://github.com/zerotier/ZeroTierOne.git
Go to the world folder at ZeroTierOne/attic/world
cd ZeroTierOne/attic/world
Edit the mkworld.cpp
file. Delete the IP
addresses of the ZeroTier controllers and add your own.
In the file identity.public
Identity for roots.back().identity = Identity...
vi mkworld.cpp
// Alice
roots.push_back(World::Root());
roots.back().identity = Identity("abXXXXXcd:0:04xxxxxxxxxxxxxxxxxxxxxxxxxxxbc");
roots.back().stableEndpoints.push_back(InetAddress("XX.XX.XX.XX/9993")); // Kyiv
Run
source ./build.sh
If ubuntu bash: c++: command not found
apt-get install gcc g++
Run the mkworld file
./mkworld
A new world.bin
file should be created. This will be the file that all your nodes need.
Copy the world.bin
file to the ZeroTier-One folder (works on Linux)
cp world.bin /var/lib/zerotier-one/planet
Checking Peer to
root@zt-moon:/home/ubuntu/ZeroTierOne/attic/world# /sbin/zerotier-cli listpeers
200 listpeers <ztaddr> <path> <latency> <version> <role>
200 listpeers 3feXXX258 192.168.88.27/9993;14100;14099 2 1.4.0 LEAF
200 listpeers 61dXCXXcb 50.7.73.34/9993;3990;3812 178 - PLANET
200 listpeers 62XXXXe71 50.7.252.138/9993;3990;3737 253 - PLANET
200 listpeers 6eXXXX3e 192.168.88.26/21136;7371;7370 0 1.4.0 LEAF
200 listpeers 778XXXX190 103.195.103.66/9993;3990;3853 137 - PLANET
200 listpeers 99XXXXdb7 195.181.173.159/9993;3990;3948 42 - PLANET
200 listpeers d0XXXX4ef 192.168.88.24/21140;9263;9263 -1 1.6.5 LEAF
Restart Zero Tier
systemctl restart zerotier-one.service
Checking Peer After
root@zt-moon:/home/ubuntu/ZeroTierOne/attic/world# /sbin/zerotier-cli listpeers
200 listpeers <ztaddr> <path> <latency> <version> <role>
200 listpeers 3fXXXXXX58 192.168.88.27/34526;27;26 1 1.4.0 LEAF
200 listpeers 6eXXXXXX3e 192.168.88.26/21136;1959;1959 1 1.4.0 LEAF
200 listpeers d0XXXXXXef 192.168.88.24/21141;5077;977 3 1.6.5 LEAF
Hey Joy! I am very, very sorry for missing this for so long. Please forgive me for the oversight!
Thank you for this contribution!!
Hi @thedunston no problem.