Package: dnssync
Thednssyncscript allows DNS zones hosted at various DNS providers
to be synchronized with local bind-style text zone files. This allows
the DNS zones to be easily version-controlled, even if the service
provider does not directly support that.Currently supported DNS service providers:DomainMonster(via HTML scraping)PowerDNSZoneEdit(via HTML scraping)Register.LY(via HTML scraping)ProjectHomepage:https://github.com/metagriffin/dnssyncBugs:https://github.com/metagriffin/dnssync/issuesInstallation$pipinstalldnssyncUsageTo download a zone from PowerDNS:$dnssyncdownload--driverpowerdns--paramapikey={KEY}--domain{DOMAIN}{ZONEFILE}These command line options can also be stored in a configuration file,
e.g.config.ini:driver=powerdnsapikey={KEY}domain={DOMAIN}zonefile={ZONEFILE}And then invoke dnssync as follows:$dnssyncdownload--configconfig.iniTo upload a zone:$dnssyncupload--configconfig.iniAnd to show differences between the hosted zone and the local
zonefile:$dnssyncdiff--configconfig.iniAnd to test that a DNS server is serving the zone as specified:$dnssyncverify--configconfig.iniNote that theverifycommand has some limitations in how accurate
it can be. For example, record-level TTL’s cannot be extracted from
DNS (only remaining time, not total time, to expiry).ConfigurationThe dnssync configuration file can specify the following options:driver:The driver for the specific DNS hosting service; currently supported
values:domainmonster: for DomainMonster.compowerdns: for PowerDNS.netzoneedit: for ZoneEdit.comdomain:The name of the zone to be operated on.zonefile:The filename of the local zone file. If specified in the
configuration, it is taken to be relative to the configuration
file. If specified on the command line, it is taken to be relative
to the current working directory.DomainMonsterThe following options exist for thedomainmonsterdriver:username:The username of the account to log into DomainMonster with.password:The password of the specifiedusernameaccount.ImportantThedomainmonsterdriver uses HTML-scraping to operate on the
hosted zone. This means that it, unfortunately, is quite brittle and
may break if DomainMonster changes its HTML structure. If this
appears to be happening, please report it tohttps://github.com/metagriffin/dnssync/issuesand I’ll fix it ASAP.PowerDNSThe following options exist for thepowerdnsdriver:apikey:The API access key provided by PowerDNS. Note that an account must
first be enabled (via the PowerDNS website) before it can be used.ImportantThe PowerDNS service has, as of 2016/09/29, been end-of-lifed.  That
means that you need to already have an account and service purchased
to be able to use this driver.ZoneEditThe following options exist for thezoneeditdriver:username:The username of the account to log into ZoneEdit with.password:The password of the specifiedusernameaccount.ImportantThezoneeditdriver uses HTML-scraping to operate on the hosted
zone (despite what ZoneEdit advertises, they do NOT have an API to
manage their DNS zones). This means that it, unfortunately, is quite
brittle and may break if ZoneEdit changes its HTML structure. If
this appears to be happening, please report it tohttps://github.com/metagriffin/dnssync/issuesand I’ll fix it ASAP.Multiple ProfilesSeveral different profiles can be stored in the same configuration; each
profile should have a section named after the domain. Global parameters can
be stored in the “DEFAULT” section. For example:[DEFAULT]# set some global parametersdriver=powerdnsapikey=2f16eef6-5b1f-4d80-96f7-0237da03db48# set the default domain to managedomain=example.com[example.com]zonefile=example-com.zone[other-example.com]zonefile=other-example-com.zoneThen, to upload the zones:# upload 'example.com'$dnssyncupload-cconfig.ini# upload 'other-example.com'$dnssyncupload-cconfig.ini-dother-example.comZonefile Local VariablesThe zonefile can also specify the configuration file via emacs-style
local variables. The configuration file specified on the command line,
however, takes precedence. For example, given the followingexample-com.zonezonefile:;; -*- coding: utf-8; dnssync-config: config.ini -*-

$ORIGIN example.com.
example.com. 3600 IN SOA ...
... more DNS records ...The following command will pull all options from theconfig.inifile:# report differences$dnssyncdiffexample-com.zone# upload a new version$dnssyncuploadexample-com.zone