DynDNS is the first provider that I knew of that offers free dynamic DNS in the good old days. I actually started using them when I was still on dial up. That’s how long they have been around. I used to create a CNAME from my domain to the whatever.dyndns.org hostname. DynDNS provides dynamic DNS to custom domains, but it wasn’t on the free tier so I had to do the CNAME thing. Using this setup, I have ran web servers, mail servers, CCTV server from home. Those were the days. ;) I have since switched to other dynamic DNS providers for my domain instead of doing the CNAME thing.
So, just a few days back, DynDNS announced that they will not be offering the free service anymore, so I thought I share my setup.
I have written previously that I use CloudFlare for my WAF/Proxy/DNS needs. On top of these, CloudFlare does have dynamic DNS as well. To use CloudFlare for dynamic DNS you will need the following.
1. An account with CloudFlare obviously.
2. Your own domain name. CloudFlare does not provide free subdomains
3. A patched version of the popular ddclient. Download from here : https://www.cloudflare.com/resources-downloads
I run ddclient on OS X. It runs on Linux too. I’m not too sure about Windows, but since the whole ddclient is written in Perl, I presume running it in Windows is possible too. I will not touch on that though.
You will need to get an API key from CloudFlare in order for ddclient to authenticate and update your IP.
You will also need to create the hostname that you want to update in the DNS Settings page.
The configuration for ddclient is on the CloudFlare download site, but this is the screenshot taken from the site anyway.
After completing the settings, run ddclient in debug mode to verify that ddclient is able to detect your IP and update the DNS servers.
ddclient -daemon=0 -debug -verbose -noquiet
ddclient can run in both daemon and cron. For convenience sake, I ran it under cron with an interval of 15 mins.
If the update to the DNS server is successfully, you have your domain nicely pointed to your dynamic IP.
There are other alternatives to CloudFlare and DynDNS. No-IP provides free subdomain hosting like CloudFlare. Similarly, ddclient can be use for updating your IP. Another alternative is Hurricane Electric which I’m using for another domain name and 6-in-4 IPv6 tunnel. (Yes, I have a public routable IPv6 network at home.) And again, ddclient can be use for updating your IP address. :)