Tag Archives: domains

HOWTO: Configure ddclient to update your Dynamic DNS entries with Google Domains

In a continuation of Google Domains includes Dynamic DNS for your self-hosted websites, I set up a ‘utilities’ virtual machine (CentOS 7) to run the DDNS daemon for my domains.  This makes sure that if my IP changes, there’s a semi-quick update.

The first thing I did was install ddclient.

yum -y install ddclient

Then, I used the Dynamic DNS entry created during the other blog posts – and grabbed the user/password info for that ddns entry.

I edited the /etc/ddclient.conf file, adding in the necessary info from domains.google.com.

utilitarian@localhost ~]# sudo cat /etc/ddclient.conf 
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

protocol=googledomains
use=web
server=domains.google.com
login=<from the domains page>
password='<in single quotes on purpose>'
www.blogdomain.dom

The www in www.blogdomain.dom above must match the DDNS record within Google Domains DNS settings.

Once that’s done, execute the ddns update:

utilitarian@localhost ~]# sudo ddclient -verbose -foreground
CONNECT:  checkip.dyndns.org
CONNECTED:  using HTTP
SENDING:  GET / HTTP/1.0
SENDING:   Host: checkip.dyndns.org
SENDING:   User-Agent: ddclient/3.8.2
SENDING:   Connection: close
SENDING:   
RECEIVE:  HTTP/1.1 200 OK
RECEIVE:  Content-Type: text/html
RECEIVE:  Server: DynDNS-CheckIP/1.0
RECEIVE:  Connection: close
RECEIVE:  Cache-Control: no-cache
RECEIVE:  Pragma: no-cache
RECEIVE:  Content-Length: 104
RECEIVE:  
RECEIVE:  <html><head><title>Current IP Check</title></head><body>Current IP Address: <redacted></body></html>
INFO:     forcing updating www.blogdomain.dom because no cached entry exists.
INFO:     setting IP address to <redacted> for www.blogdomain.dom
UPDATE:   updating www.blogdomain.dom
CONNECT:  domains.google.com
CONNECTED:  using SSL
SENDING:  GET /nic/update?system=dyndns&hostname=www.blogdomain.dom&myip=<redacted> HTTP/1.0
SENDING:   Host: domains.google.com
SENDING:   Authorization: Basic <redacted>
SENDING:   User-Agent: ddclient/3.8.2
SENDING:   Connection: close

Now, add it to cron to run every 2 hours on the half-hour & log the results:

30 */2 * * * /usr/sbin/ddclient -verbose >> /var/log/ddclient_updates.out

 

Google Domains includes Dynamic DNS for your self-hosted websites

Oh, the good-old-days, when DYNDNS was free – and so was zoneedit.  Move forward to today, where everything costs (and it should!).

Since I’m so heavily invested in Google from a tech perspective, I opted in to try their registrar service: Google Domains.

Transferring in was easy (see ya 1and1!) and setting up custom resource records (DNS entries) was simple.

Then, I read about Dynamic DNS being included with the service (along with free domain privacy) and I was intrigued.

Google offers their ‘help’ page here – but it left me questioning something.

I’m not going to re-write their doc, however, if you have any subdomains (www, blog, etc), THOSE are your synthetic Dynamic DNS records.