I recently setup up an OpenVPN server, and I wished to setup a dynamic DNS entry for my configuration. While sites like No-IP and Dyn offer premium DNS packages, it made more sense to leverage Amazon's Route53 DNS service, which I already pay for, along with a simple script to create a dynamic DNS system.
To do that, you first need to setup the
AWS Command Line Interface
for your operating system. Once you have that installed and configured,
then create the script seen in the Gist below in the path
/usr/bin/updateDomain.sh. In your revsion, replace the zone ID on
line three with your domain's zone ID from AWS Route53 and replace the domain on
line four with the full domain you'd like to update. Also, be sure to make the
file executable by running
sudo chmod +x /usr/bin/updateDomain.sh.
Then, create a cron job that runs periodically - in my case I chose daily - to
execute the dynamic DNS update script.
To run a test, simply execute the script
/usr/bin/updateDomain.sh and check the entry in Route53 to ensure