key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.53k stars 228 forks source link

ZeroTier 1.6.0+ DNS Configuration #47

Closed lflare closed 3 years ago

lflare commented 3 years ago

Hello,

In the recent changes in ZeroTier, it is now possible to specify the DNS servers for a controller configuration, can that functionality be ported to ztncui as well?

key-networks commented 3 years ago

I'll keep that in mind if I have time to do further development. In the meantime, code contributions are very welcome.

gabviv73 commented 3 years ago

Someone could post the manual configuration needed to achieve DNS functionality ?

Thx

key-networks commented 3 years ago

Does anyone know where the configuration of DNS is documented? I don't see it at https://github.com/zerotier/ZeroTierOne/tree/master/controller

key-networks commented 3 years ago

I'm guessing that it's just a list of IP addresses... but not sure.

lflare commented 3 years ago

Does anyone know where the configuration of DNS is documented? I don't see it at https://github.com/zerotier/ZeroTierOne/tree/master/controller

I just have manual configuration.

curl -v --header "X-ZT1-Auth: $(cat /var/lib/zerotier-one/authtoken.secret)" http://localhost:9993/controller/network/NETWORKID--data '{"dns": {"domain": "INTERNAL.NET", "servers": ["DNS SERVER"]}}'

key-networks commented 3 years ago

Thanks, @lflare!

gabviv73 commented 3 years ago

So there are only parameters that points to an existng DNS server ? Isn't there an internal DNS server if I understood correctly ? Do we need an external DNS that syncs with hostnames like https://github.com/mje-nz/zerotier-dns ?

Overbryd commented 3 years ago

I configured it at my.zerotier.com and checked the JSON response from the web inspector.

There the dns sections looks like this:

"dns": {
  "domain": ".vlan",
  "servers": [
    "8.8.8.8"
  ]
}
Overbryd commented 3 years ago

@key-networks do you have a JSON-schema somewhere of the complete zero tier configuration?

I would love to contribute to the project, but with limited information on a brittle JSON configuration (zerotier config will not work if JSON is incorrect), it seems rather hard to do. Happy to help the cause.

key-networks commented 3 years ago

@Overbryd unfortunately not. IIRC, I just referred to the README.md here: https://github.com/zerotier/ZeroTierOne/tree/master/controller

lideming commented 3 years ago

I just created a PR (#57) which includes support for DNS configuration.

key-networks commented 3 years ago

Thanks, @lideming - I'll have a look at it.

key-networks commented 3 years ago

Does anyone want to help test https://github.com/key-networks/ztncui/pull/57 and give their feedback? I'm having trouble building rpm and deb packages for testing due to issues with pkg, but you can try from source in the meantime.

ali-95 commented 3 years ago

Можно уже закрывать