mths : sdrbrg ;

# dynamic dns using amazon route53

For the past ten months or so I’ve been using no-ip.com’s Dynamic DNS service for my home server, and while it works just fine, it’s rather annoying to have to go through a “confirm” process every 30 days.

Recently I ended up on Will Warren’s blog, and more specifically this post and realized that I could do the same as I had moved this blog from GitHub pages to AWS S3 and in the process also moved over to Route53.

I couldn’t resist a little hacking, so I extended Will’s script and created a GitHub repo for it: ddns-route53. While a repo might be a bit overkill (could’ve just made the script a gist), I like repos as I usually find them easier to find and I could also add some light testing (running shellcheck on Travis).

Anyhow, If you already have a hosted zone setup using Route53, getting started is just a few commands away:

$ curl -sLO https://github.com/mthssdrbrg/ddns-route53/raw/master/ddns-route53
$ chmod +x ddns-route53
$ ./ddns-route53 --zone-id=$YOUR_ZONE_ID --record-set=$YOUR_RECORD_SET

It’s also possible to specify an explicit IP with the --ip flag, which is convenient for running the script from another machine (I used it from my laptop during development for example), otherwise it’ll look up the IP of your current machine using OpenDNS.

$ ./ddns-route53 --zone-id=$YOUR_ZONE_ID --record-set=$YOUR_RECORD_SET --ip=$YOUR_IP
05 Jan 2016 / aws dns route53 shell bash