ZeroTierOne icon indicating copy to clipboard operation
ZeroTierOne copied to clipboard

allowDNS doesn't work on Linux: `LinuxEthernetTap::setDns` doesn't do anything

Open jfly opened this issue 4 months ago • 2 comments

I'm trying to enable allowDNS on Ubuntu, and it's not doing anything. No changes to /etc/resolv.conf, nothing.

I dug into the code, and it looks like this is because LinuxEthernetTap::setDns simply is a no-op:

https://github.com/zerotier/ZeroTierOne/blob/185a3a2c76e6bf1b1c0415871f43076638eb007c/osdep/LinuxEthernetTap.hpp#L61

It found some threads online talking about this:

  • https://www.reddit.com/r/zerotier/comments/lmei2w/how_do_you_set_up_the_new_dns_feature/
  • https://discuss.zerotier.com/t/dns-servers-ignored-on-ubuntu/25231

But I couldn't find any official docs talking about this, so I thought I'd ask here:

  1. Is this feature WIP, or intentionally not supported on Linux?
  2. Would you accept a PR adding some logging to LinuxEthernetTap::setDns with some explanation about the state of this? The current behavior is very confusing.

jfly avatar Jul 30 '25 19:07 jfly

Thanks for writing. It's definitely not implemented. If you didn't see any notes about it, we need to improve the docs. There are so many ways to do dns on linux, we didn't implement any of them. There's a systemd based tool here https://github.com/zerotier/zerotier-systemd-manager

laduke avatar Jul 31 '25 15:07 laduke

Thanks for the pointer to https://github.com/zerotier/zerotier-systemd-manager, I'll check it out.

I do believe a warning would be a godsend for future users. How does https://github.com/zerotier/ZeroTierOne/pull/2493 look?

jfly avatar Jul 31 '25 21:07 jfly