Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let google domains DynamicDNS to update ipv4 instead of ipv6 for Raspberry pi3

Tags:

I am trying to setup personal Web Server on my Raspberry Pi3, I bought domain from Google Domains so that I could use the Dynamic DNS to let google could update IP Address of my Raspberry-Pi webserver (because my ISP provides Dynamic IP).

On my Raspberry Pi I am using crontab for periodic update by using the wget command as recommended by google. This is the 'syntax' (as adviced by google) what I am using to get the DNS update done: wget https://username:[email protected]/nic/update?hostname=subdomain.yourdomain.com

The Problem! Google communicates well and updates my IP but it brings up the IPv6 instead of IPv4 address of my Raspberry Pi.

Question: What changes should I make on my Pi so that google updates itself with my public IPv4 address rather than IPv6. Kindly note that I am a beginner, so please provide the steps I could easily follow

A big thank you!

like image 678
F. Ahmed Avatar asked Feb 15 '18 18:02

F. Ahmed


1 Answers

Add -4 to wget's parameters. Google Domains updates the Dynamic DNS synthetic record with the source IP of your request (as seen by Google servers). Thus, you need to force wget to make this request over IPv4 which is what the -4 parameter does.

like image 179
Alex Klyubin Avatar answered Sep 22 '22 12:09

Alex Klyubin