zerotier / zeronsd

A DNS server for ZeroTier users
https://zerotier.com
BSD 3-Clause "New" or "Revised" License
493 stars 56 forks source link

Create a command line option no-configure-network #213

Open laduke opened 1 year ago

laduke commented 1 year ago

For #205 Makes it not configure the dns servers and domain on the zerotier network in my.zerotier.com

That was easy. Will try to add a test if I get motivated.

aplum commented 1 year ago

Thanks for working on this @laduke! I'll try to test this in my environment soon.

Could you also add some documentation about this option? Maybe something like this under "Configuration" in the main README:

- no_configure_network: (bool) Prevent zeronsd from changing the DNS Search Domain and Server Addresses in ZeroTier Central. Default is `false`. Typically only necessary in more complex setups with multiple DNS servers. Also, with this enabled, zeronsd can run with a token that has read-only access.
laduke commented 1 year ago

Sure. There should be some docs for it under zeronsd help start now.

aplum commented 1 year ago

I've tested this in our environment and it works. Tested both true and false. (Built using docker, then copied the binary to our production machine and replaced /usr/bin/zeronsd. There's probably a better way, but that worked.)

One little issue: I'm using a YAML config file and for some reason this option seems to be required in it? If I omit it, zeronsd exits with the message missing field `no_configure_network`. Btw, this is also true for wildcard and local_url.

There should be some docs for it under zeronsd help start now.

Any chance you could also add it to the README? This wouldn't be the first project that has the functionality I need, but it takes me a while to find because it's one of the few options not in the README 🙂

laduke commented 1 year ago

If I omit it, zeronsd exits with the message missing field no_configure_network. Btw, this is also true for wildcard and local_url.

That's... fun. Need to think about that.

laduke commented 1 year ago

I'd fixup the other issues in different PRs