StackExchange/dnscontrol

Name: dnscontrol

Owner: Stack Overflow

Description: Synchronize your DNS to multiple providers from a simple DSL

Created: 2016-08-30 17:42:30.0

Updated: 2018-05-24 03:00:07.0

Pushed: 2018-05-13 12:31:39.0

Homepage: https://stackexchange.github.io/dnscontrol/

Size: 6704

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

DNSControl

Build Status Gitter chat Google Group chat

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 talk to Microsoft ActiveDirectory and it 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.

You can think of it as a DNS compiler. The configuration files are written in a DSL that looks a lot like JavaScript. It is compiled to an intermediate representation (IR). Compiler back-ends use the IR to update your DNS zones on services such as Route53, CloudFlare, and Gandi, or systems such as BIND and ActiveDirectory.

An Example

dnsconfig.js:

efine our registrar and providers
namecom = NewRegistrar("name.com", "NAMEDOTCOM");
r53 = NewDnsProvider("r53", "ROUTE53")

xample.com", namecom, DnsProvider(r53),
"@", "1.2.3.4"),
AME("www","@"),
("@",5,"mail.myserver.com."),
"test", "5.6.7.8")

Running 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.

Running dnscontrol push will make those changes with the provider and my dns records will be correctly updated.

See Getting Started page on documentation site.

Benefits

Installation

From source

DNSControl can be built with Go version 1.7 or higher. To install, simply run

go get github.com/StackExchange/dnscontrol

dnscontrol should be installed in $GOPATH/bin

Via packages

Get prebuilt binaries from github releases

Via docker
er run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json stackexchange/dnscontrol dnscontrol preview

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.