Score:1

Using a DNS server with ZeroTier

gh flag

I have setup my own Zerotier Controller using ztncui and it works great, but there is one piece of my setup that I cannot seem to get to work and that is having clients use the DNS I configure for the ZeroTier network. The DNS is configured as follows:

{
  "domain": "",
  "servers": [
    "10.10.14.26"
  ]
}

Where 10.10.14.26 is the ZeroTier IP address of the DNS server (just as Linux server running dnsmasq forwarding to the local router). Whenever I test the responses of the DNS server directly on a ZeroTier client, I do get the correct results (e.g. configuring my DNS to use it directly, or specifying the DNS server when using dig), however when selecting "Allow DNS Configuration" on the clients, they still refuse to resolve hostnames that do get resolved when asking the DNS server directly.

I also tried using the local IP address of the DNS server rather than the ZeroTier IP, with the same results (IP forwarding is setup on that same Linux server such that clients can access the local IPs too).

What do I need to do to make sure my ZeroTier clients will use the DNS server I have configured?

My backup plan is to just write various scripts for the different platforms I need to support and have them overwrite and restore the global DNS when connecting and disconnecting to my ZeroTier network respectively, but then what is the use of the "Allow DNS Configuration" option.

I know the DNS feature does not work for Linux clients, but I will be the only Linux client, so this isn't much of a problem for me. The rest of the clients will use either Windows or MacOS, for which this feature is reported to work:

ZeroTier managed DNS is currently only supported on Windows, MacOS, Android, and iOS. Linux support is forthcoming but may be limited to common Linux DNS resolver configurations such as those found in Debian and CentOS/RHEL.

Score:0
gh flag

Though this is not a proper answer to my own question, it did solve my needs. As described in this post I ended up forcing the VPN server through additional iptables commands:

iptables -t nat -A PREROUTING -s vpn_network -p udp --dport 53 -j DNAT \
    --to-destination your_DNS_server
iptables -t nat -A PREROUTING -s vpn_network -p tcp --dport 53 -j DNAT \
    --to-destination your_DNS_server

Note: The Windows 10 machine I tested this on did not immediately show the correct results, but after resetting most of my experimental changes, it did kept working properly. When I then tested it on a clean machine, it immediately worked.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.