Google domains provide excellent Dynamic DNS services free with the hosting for IPv4 and IPv6. In case you have a small web service hosted using dynamic dns this tool can be very helpful for setting up low cost hosting in few minutes. Most of the common Broadband routers these days support on TZO or Dyn.com which are paid services of dyn.com. Create the port forwarding for your broadband or DSL routers to your LAN device IP and the follow the steps.
pi@raspberrypi:~ $ sudo apt update pi@raspberrypi:~ $ sudo apt insatll ddclient
after successful installation of ddclient edit the configuration file at /etc/ddclient.conf in your favorite editor
# Configuration file for ddclient generated by debconf # /etc/ddclient.conf ssl=yes #protocol=dyndns2 protocol=googledomains use=web server=domains.google.com login=googledomaindyndnslogin password='autogeneratedpasswordformgoogle' www.affan.info daemon=100
Protocol is used as
protocol=dyndns2for other dynamic dns servers but for google
protocol=googledomainsworks not the first one. its important to set option
use=webif this option is not set the ddclient will take the local interface ip instead of the actual IP address of your broadband WAN interface.
Once configuration is done save the file and restart the client .
pi@raspberrypi:~ $ sudo service ddclient restart. To verify the setup and ip run the following command
pi@raspberrypi:~ $ sudo ddclient -query. Match the output ip with your google domain console.