allowDNS doesn't work on Linux: `LinuxEthernetTap::setDns` doesn't do anything
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:
- Is this feature WIP, or intentionally not supported on Linux?
- I understand that there are lots of ways to do networking and DNS on Linux. Supporting systemd-resolved would work well for a lot of Linux users (myself include). See How to Implement this in Your VPN Software > If managing a corporate VPN for how to configure dns for a specific tld, which would work well with ZT's model.
- Would you accept a PR adding some logging to
LinuxEthernetTap::setDnswith some explanation about the state of this? The current behavior is very confusing.
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
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?