dns.zt
is a CoreDNS-based Docker container that allows for name resolution of your ZeroTier peers. You should point your local machine's DNS to localhost (127.0.0.1) to enable this mapping.
Configuration requires a single config.yml
file, setup as follows:
zt:
networks: ["network1", "network2"] # this can also just be "network1"
tlds: "zt" # this can also be a list of the same length as `networks`
access_token: <token> # this is generated on your ZeroTier account
dnses: ["1.1.1.1", "1.0.0.1", ] # the default DNS, provided by Cloudflare
A likely setup would be as follows:
ztdns
├── config.yml # This configuration file should be manually added
├── Corefile # This is automatically generated by DNS.zt
└── zt.hosts # This is automatically generated by DNS.zt
- Head over to My Account on ZeroTier
- Find the "API Access Tokens" section
- Create a "New Token"
NOTE: Don't store this in a publicly accessible folder/repository. It gives wide-ranging privileges to your ZeroTier account.
We use your access_token
to query your ZeroTier networks by name. The entire "API" is read-only, and you can validate that by looking at tasks/ztapi.py.
- Doesn't play nicely with VPNs (tested on Mullvad, Proton, TunnelBear, PIA)
- Requires your host to be running
zerotier-one
.