Page 1 of 1

Dynamic DNS to Google Domains

Posted: Mon Sep 30, 2019 1:57 pm
by poufsama
I am trying to use DDNS to update Google domains. They have some instructions online (I am not allowed to post a url
but googling "google domain dynamic dns" provides a link to the support page I used)

Since it was not supported out of the box, I added a new entry for it in ddns_providers.conf with the URL template. I was able to create the entry, but then it fails to update saying it cannot retrieve the remote IP:
Sun Sep 29 20:01:43 2019 daemon info ddns_gargoyle[1471]: remote IP cannot be determined
I checked the source code of ddns_gargoyle and the only thing I can think would fail here is the call to gethostbyname. An nslookup of the domain fails strangely: it prints an Address 1 with the remote IP address as expected but then fails and returns an error.

I can probably do some more digging around, but I wanted to know if google domains would be supported or not since OpenWRT claims support for it but it is not in the providers for Gargoyle.

Re: Dynamic DNS to Google Domains

Posted: Mon Sep 30, 2019 5:36 pm
by Lantis
Can you share your conf entry?
It looks simple enough. Should be no reason it can't be supported.

Re: Dynamic DNS to Google Domains

Posted: Tue Oct 01, 2019 12:55 am
by poufsama
I guess something went horribly wrong while I was trying it to get to work. I lost DNS resolution and could not get it to work again.
I restored the default configuration and manually made the changes again (replace the _ with a . for the url as I cannot paste url):

Code: Select all

service domains_google_com
	url_template                    https://[[USERNAME]]:[[PASSWORD]]@domains_google_com/nic/update?hostname=[[DOMAIN]]&myip=[[IP]]  
	required_variables              domain username password
	required_variable_names	DyDNS.DoNm,DyDNS.UsrN,DyDNS.Pssw
	success_regexp                  /^(good|nochg)/
And reconfigured from the UI and it works.

I am wondering if the changes I made manually in the ddns_gargoyle.conf are the culprit.
When I originally configured it, there was an error in the UI and it failed to save. So the second time I unchecked the enabled box, and saved.
I then looked up at the file and saw it was sourcing from internet. Since I set my modem on IP passthrough, I manually switched it to wan and then tried to start it manually. I now realize that the right way to do it was to set

Code: Select all

	ip_source	interface
	ip_interface	eth1.2
Also I noticed that these settings are lost when I update from the UI: it always revert to internet. I made the changes manually and started the ddns_gargoyle daemon from the command line for now.

Thanks

Re: Dynamic DNS to Google Domains

Posted: Wed Oct 02, 2019 12:49 am
by Lantis
Thanks for sharing and I'm glad it is now working.
I'll add this as a new provider for an upcoming update.

You shouldn't need to change it away from using internet as a source, but you are certainly free to do so.
This setting is overwritten if you make any changes in the GUI. Most users don't need to modify this setting.

Re: Dynamic DNS to Google Domains

Posted: Fri Oct 04, 2019 7:00 am
by Lantis