Resolve DNS with dynamic IP for google domain with ddclient.

Jiashun Zheng
2 min readAug 1, 2020

--

Very often you will get a dynamic IP from your ISP, so whenever the IP changes you need to notify your domain service provider that you now want to map the domain name to a new IP address, so users will be able to continue visiting your home website with a domain name in the address bar.

ddclient is a tool to automatically update the IP with your domain provider or dynamic DNS provider.

If you happened to use google domain like me, here is a short protocol to setup ddclient to work with google domain:

  1. Install the ddclient, using Ubuntu as an example.
apt install ddclient

In Ubuntu 20.04, the installation will ask a few questions, simply skip those and just install the package.

2. Login to google domain account and get the login/password for your domain.

setup the dynamic DNS credentials for your subdomains
click view credentials to show the login information

3. Editor the configuration

sudo nano /etc/ddclient.conf, replace the login and password with the username and password you get from clicking the “View credentials” in the last step. Notice that curl ipecho.net/plain will provide the IP for your server to be used by ddclient.

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
ssl=yes
use=cmd
cmd=’curl ipecho.net/plain’
protocol=googledomains, \
login=’mylogin’, password=’mypassword’ mydomain.com

4. Test to make sure things are working properly:

sudo ddclient -daemon=0 -debug -verbose -noquiet

5. Restart the ddclient service:

sudo /etc/init.d/ddclient restart

6. Reference:

https://help.ubuntu.com/community/DynamicDNS

--

--

No responses yet