Dynamic Update Client for Google Domains

Installation Guide – Dynamic Update Client for Google Domains – (Updated 2-5-2021)

This program is to update the IP address of the server hosting files or sites for a Google Domain. It uses the Google Domains API to push updates. It can be configured to update multiple hostnames and sub domains across multiple accounts.

NOTES: This installation if meant for Raspberry Pi and Raspbian OS but should work on any linux distribution. This guide also assumes that you already have basic terminal skills and know how to locate files and folders with it. It also assumes you have Thonny Python Editor installed, Raspbian OS comes with it by default at the time of this guide. Also anything within quotations ” “, are terminal commands.

To get started, download the installer.

Then on your Pi or Linux machine open Terminal.

From there type “cd Downloads” or wherever your download directory is.

You may use “ls” to list the files to make sure the file downloaded correctly.

Next you will want to run it in bash with the following command
“sudo bash http://bintech-llc.com/Public_Releases/Google_DUC_Installer.sh”

Let that run and and finish, you will need the terminal window again later. This should have created a new directory in the root called GoogleDNS with the main program and config files within. You can check this by typing “cd GoogleDNS” followed by an “ls” command and see if the files have been created.

Next you will want to go to domains.google.com/registrar and log in. I would recommend doing this on the Pi or Linux machine in its web browser as you will need to copy things over in a minute.

Once you have logged in, click on the domain of choice.

When that page loads, click on DNS.

After that page loads, scroll down to Synthetic Records.

Change the record type to Dynamic Update.

If you are setting this up for the root domain, put an @ symbol in the subdomain box and hit add.

If it does not let you add that, there is a work around, set it as an asterisk *

Then go back to the new record and hit edit, then change the asterisk to an @ symbol, and click Save.

If you are setting this up for a sub host, enter the new sub host in the Subdomain box and click add.

The following steps are the same with a root domain name and subdomain names. Now that the hostname or subdomain is set as Dynamic DNS, scroll down and find the record again and hit the drop down arrow.

Then click View credentials.

Now back to Terminal. If you are not in the /GoogleDNS directory you can return there by using the following command:

“cd /GoogleDNS”

Just to double check everything, run an “ls” command to list the contents. If you do not see GoogleDNS.py, config.py, hostsFile.py, and a logs directory present, please run the installer again.

If you do see those files and folders we can continue. This is where you will need Thonny Python Editor.

From Terminal run “thonny hostsFile.ph” If you run this command in sudo, it may screw up the file permissions and cause the program to fail.

It should open the hosts file for the program.

Change the values in quotations ” ” to match the record in Google Domains

Now you can save and close that file and go back to terminal.

Now you should be able to run “sudo python3.7 /GoogleDNS/GoogleDNS.py” and it will update the IP address. With new hostnames, it will throw a few errors at the beginning if the host has not had a previous IP address and the address shows as 0.0.0.0 in Google Domains. Once the host has been updated for 24 hours those errors should stop.

You can also add “sudo python3.7 /GoogleDNS/GoogleDNS.py” to your startup script, if you would like to setup auto start for a standard Raspbian OS installation, you can view this guide.

ADDITIONAL NOTES: If you have a local DNS server, it will always show new address as it will start pulling the local IP address if a local record exists otherwise it will check google directly to see what your IP is based on what the last resolved IP of the host is, when there is a change, it will update it, when there is not, it does not. If you are getting your local IP as the last IP address, that is due to your local DNS server.

If you have any other questions, you can contact me at support@bintech-llc.com