by mittermayr · 4y ago · 0 comments
curl -s -k --user "username:password" "https://domains.google.com/nic/update?hostname=yourdomain.com"
There's more parameters (and you can specify an IP, the above request only takes the caller's IP).Here are the docs: https://support.google.com/domains/answer/6147083?hl=en#zipp...
Quick question, is there a reason the -k (--insecure) flag is included? I imagine that https://domains.google.com would use a cert trusted by curl so it seems unnecessary and adds a risk that your traffic could be MitM.
Does this mean Let's Encrypt dns-01 challenges could be automated?
[edit: Oh the API only allows changing an A record, for dynamic DNS, not updating anything else in the zone. That makes more sense.]
Here's the relevant portion of my ddclient config:
protocol=googledomains
login=XXXXXXX
password=XXXXXXX
host4.mydomain.com
protocol=googledomains
use=web
web=checkipv6.dyndns.org/
ipv6=yes
login=XXXXXXXC
password=XXXXXXX
host6.mydomain.comwhen I go into the web ui for my domain and go to create a dynamic dns name, it only gives me an option for only an A record.
My "guess" is that your solution is to create a normal AAAA record and ddclient can update that record with the info retrieved from checkipv6.dyndns.org? so not using google's UI to setup a AAAA dyn dns record? and my guess is that username/password scoping that you got for host4 worked the same for the "fake static" AAAA record?
or you could have the ability to create AAAA dyn dns records via the UI and for some reason I'm just blind.
But after you update the record using ddclient or whatever, the UI will show the correct type:
As a side note - will the recent announcement by Google about unsafe logins being denied affect you?
https://en.wikipedia.org/wiki/Basic_access_authentication#Se...
~~Also as the parent noted, Google have the last few years been very aggressive about "unsafe login" (using usr+pass outside of Google) and this might disappear.~~
Edit: Never mind, buried in the docs it appears the user:pass are scoped.
https://support.google.com/domains/answer/6147083?hl=en&ref_...