github.com/tsavola/indns (go): Package indns provides a DNS server component.  Package indns/dnsserver provides a simple, authoritative DNS server.  It needs a zone database.  Package indns/dnszone provides a static in-memory zone database.  While indns is generic, its intended use case is to support wildcard TLS certificate verification.  It can be combined with https://github.com/mholt/certmagic and https://github.com/tsavola/legodns to achieve automatic ACME certificate renewal, integrated into a single Go program.  The idea is that there are fewer moving parts if the TLS server and its name server are the same server (e.g. 192.0.2.0).  We just need some domain names: one for the name server (example.net), and one for the TLS server with wildcard needs (example.org).  One could also be a subdomain of the other, but that would be messier to illustrate.  1. Zone “example.net” is hosted somewhere.  2. Name “ns1.example.net” is configured with address 192.0.2.0.  3. A server program with integrated indns is running at 192.0.2.0.  4. It configures dnsserver as “ns1.example.net”.  5. It configures dnszone “example.org” with address 192.0.2.0 for all names.  6. “ns1.example.net” is registered as the primary name server of the “example.org” domain.  7. Another name server mirroring “ns1.example.net” should be registered as a secondary name server of the “example.org” domain (but the setup works also without one).  Steps 3, 4, and 5 as code:  ACME example
Keywords: dns|go|server