DNSControl
I’ve found a really nice post describing how someone moved their DNS from Amazon Route53 to Hetzner … and given multiple reasons, I gave it a try. For reasons:
- reduce reliance on US technology (well, at least the smallest bits),
- I’m paying $0.54 per month for a domain that has super low traffic,
- I’m trying to make one step closer towards Infrastructure as a Service: and this is one area where managing configuration as code makes life so much easier (what was I trying to do here? ah … this is how I did it …).
Overall, really nice and also learning a bit on the way. Had trouble just with
R53_ALIAS, which was pointing the apex of the domain to a CloudFront
distribution address, which Hetzner doesn’t support.
The gist of the solution:
- a git repository, with
dnsconfig.js, obtained with theget-zonescommand. A small detail here, credentials stored as well in the repository, but encrypted withgit-crypt– and had a really nice surprise: I can configure and manage both domains at Namecheap and Hetzner with a single solution. - manual adjustments, and liberal use of
dnscontrol preview - once happy (and everything passing),
dnscontrol push - changing the NS for the domain to Hetzner
- manually going and deleting the zone from Amazon.