Use CloudFlare for Dynamic DNS on Windows

The most popular Dynamic DNS provider, DynDNS, is now a paid service. There are other alternatives, each with their own pros and cons. Many DNS updaters, modems and routers support DynDNS. If you own a domain already this solution might interest you.

With a Static IP, you only need to create a permanent A record in DNS management. Most domain registrars do not allow Dynamic DNS. The server I want to access via subdomain has a Dynamic IP. While researching possible solutions, a friend hinted that you can update A records using the CloudFlare API. The domain already uses CloudFlare, so this is great news.

If you have got this far, you already know how to configure your firewall and port forward. You should be able to access the server from the internet using your IP address and port.

Follow the CloudFlare setup to point your nameserver to the correct location. If you intend to use a subdomain, create the A record in DNS management. Make sure CloudFlare is off for this record (optional, might be ok for your purposes).

cfdiagram

There are various ways to make a CloudFlare DNS updater, but no easy solution for Windows. I recently stumbled on one that works well, CloudFlare DDNS Updater. You can download it here.

You will need your API Key, primary domain name and the email address associated with your CloudFlare account. Once successful it will download your DNS records. You can then select which one you want to update. DNS propagation may take some time. Check CloudFlare to see if the address matches your IP address, then test from another internet connection.

It’s usually only $5-10 a year to register a domain. CloudFlare is a free service. This solution is cost effective and cleaner than having a subdomain of a free Dynamic DNS provider. No need to worry about confirming the DNS every 30 days, and remote.mydomain.com is far nicer than mydomain.freedns-rulez.net.

Note: In some environments (64-bit) CloudFlare DDNS Updater will not install as a service, there is a bug in v0.1. If you set the username as .\username rather than just username, it will successfully install as a service.