Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.
/ zerodns Public archive

A ZeroTier-DNS to allow for human-readable names of ZeroTier peers.

License

Notifications You must be signed in to change notification settings

jmuchovej/zerodns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dns.zt

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.

Usage

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

Generating an access_token

  1. Head over to My Account on ZeroTier
  2. Find the "API Access Tokens" section
  3. Create a "New Token"

NOTE: Don't store this in a publicly accessible folder/repository. It gives wide-ranging privileges to your ZeroTier account.

Why does DNS.zt need my access_token?

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.

Current limitations

  1. Doesn't play nicely with VPNs (tested on Mullvad, Proton, TunnelBear, PIA)
  2. Requires your host to be running zerotier-one.