dnscontrol icon indicating copy to clipboard operation
dnscontrol copied to clipboard

Provider Request: knot-dns

Open elektro-wolle opened this issue 7 years ago • 4 comments

I'm using knot-dns as a hidden-primary DNS. I'ld like to add a provider for this nameserver, but:

  • should I use the knotc-CLI and parse the data in the go-code (dependency from go code to the knotc binary)
  • or should I clone the binary socket-protocol, defined in knot (highly dependent on knot internal libraries)?

What is the least ugly solution for dnscontrol?

elektro-wolle avatar Jan 21 '19 16:01 elektro-wolle

That's an interesting question!

I'm not familiar with knot-dns (except that it has a great reputation!). Here's some questions I have:

  • Would either solution require dnscontrol to run on the DNS server itself? Is that important?
  • Would either solution be more reliable than the other? For example a binary protocol tends to avoid issues around parsing, word wrapping, etc.
  • Is either easier to implement? For example, would the CLI require parsing text output of the command, which would require chasing the protocol as it changes?

To write a provider you basically just need a function that gets the entire domain (and translates it into our datastructure format) and a function (or group of functions) that perform updates. If both provide that functionality, either is fine. Use the above 3 questions to guide you.

tlimoncelli avatar Jan 22 '19 20:01 tlimoncelli

I've decided to use the cleaner CLI-Interface. Currently, there are no word or line wraps to handle. Each RR is on a separate line. The CLI seems to be more stable than the enum based socket-interface. The provider configuration will contain the path to the executable (knotc) but could also be a ssh command to a remote system, calling the knotc binary there. I forked the project and will provide the PR, when ready.

elektro-wolle avatar Jan 23 '19 23:01 elektro-wolle

That seems reasonable. I'd just advise it should be clear from the docs and error messages what a user needs to do to get it working.

captncraig avatar Jan 23 '19 23:01 captncraig

P.S. I like the idea about ssh!

tlimoncelli avatar Jan 28 '19 17:01 tlimoncelli

I am not sure why a dedicated provider is required here that need a lot of workarounds to get a stable state. The axfrddns provider works just fine with knot.

x70b1 avatar Feb 01 '23 11:02 x70b1

I came here to write the exact same thing. :)

I am not sure why a dedicated provider is required here that need a lot of workarounds to get a stable state. The axfrddns provider works just fine with knot.

It also works against BIND.

systemcrash avatar Mar 16 '23 20:03 systemcrash

I'm knot familiar with knot. (I came here just to write that :-) )

Can I get a volunteer to write up a documentation/providers/knot.md file with examples of how to use the BIND and axfrddns providers to support Knot?

tlimoncelli avatar Mar 16 '23 20:03 tlimoncelli

it already exists

Oh duh.

tlimoncelli avatar Mar 16 '23 21:03 tlimoncelli

So all this is just asking to remove it from the list? like this? https://github.com/StackExchange/dnscontrol/pull/2184

(Sorry for being so blind!)

tlimoncelli avatar Mar 16 '23 22:03 tlimoncelli

I was also blind... The afxrddns solution works perfect.

elektro-wolle avatar Mar 16 '23 23:03 elektro-wolle