6

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:password@domains.google.com/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!

F. Ahmed
  • 61
  • 3

1 Answers1

4

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.

Alex Klyubin
  • 5,554
  • 2
  • 29
  • 24