DNSControl is a system for maintaining DNS zones. It has two parts: a domain specific language (DSL) for describing DNS zones plus software that processes the DSL and pushes the resulting zones to DNS providers such as Route53, Cloudflare, and Gandi. It can send the same DNS records to multiple providers. It even generates the most beautiful BIND zone files ever. It runs anywhere Go runs (Linux, macOS, Windows). The provider model is extensible, so more providers can be added.
Currently supported DNS providers:
At Stack Overflow, we use this system to manage hundreds of domains and subdomains across multiple registrars and DNS providers.
// define our registrar and providers var namecom = NewRegistrar("name.com", "NAMEDOTCOM"); var r53 = NewDnsProvider("r53", "ROUTE53") D("example.com", namecom, DnsProvider(r53), A("@", "126.96.36.199"), CNAME("www","@"), MX("@",5,"mail.myserver.com."), A("test", "188.8.131.52") )
dnscontrol preview will talk to the providers (here name.com as registrar and route 53 as the dns host), and determine what changes need to be made.
dnscontrol push will make those changes with the provider and my dns records will be correctly updated.
See Getting Started page on documentation site.
DNSControl can be built with Go version 1.16 or higher.
go get command will download the source, compile it, and
dnscontrol in your
To install, simply run
GO111MODULE=on go get github.com/StackExchange/dnscontrol/v3
To download the source
git clone github.com/StackExchange/dnscontrol
If these don't work, more info is in #805.
Get prebuilt binaries from github releases
Alternatively, on Mac you can install it using homebrew:
brew install dnscontrol
docker run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json stackexchange/dnscontrol dnscontrol preview
The documentation can be viewed via Docker:
docker run --rm -it --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:3.8 jekyll build -V
The website: https://stackexchange.github.io/dnscontrol/
The getting started guide: https://stackexchange.github.io/dnscontrol/getting-started