dschanoeh/hover-ddns

Suddenly doesn't update

stipus opened this issue · 5 comments

Hello, and thanks for your tool.
Suddenly I can't get the service to update the hover dns record.

I stopped the systemctl service and tried a dry run. Here is the output (sensitive info changed to XXX YYY blah blah.com):

stipus@ventilo:~$ hover-ddns -version
hover-ddns version 0.5.1, commit 9e7bb25, built at 2021-08-29T14:25:53Z by goreleaser

stipus@ventilo:~$ hover-ddns -debug -verbose -dry-run -config /etc/hover-ddns.yaml
INFO[0000] Getting public IPv4...
WARN[0000] Failed to get public ip: Didn't get any results for the query
INFO[0000] Received public IP
INFO[0000] Getting public IPv6...
INFO[0000] Received public IP 2a01:cb00:8a83:3a00:f22f:XXXX:YYYY:ZZZ
INFO[0000] --- Processing host ventilo.blahblah.com ---
INFO[0000] Resolving current IPv6...
INFO[0000] Received current IPv6 2a01:cb00:8a83:3a00:f22f:XXXX:YYYY:ZZZ
INFO[0000] v6 DNS entry already up to date - nothing to do.

It's not receiving the ip v4 address.

If I try manually from api.ipify I get it
curl -s https://api.ipify.org\?format\=text
90.63.AA.BBB

For IPV6
curl 'https://api64.ipify.org?format=text'
2a01:cb00:8a83:3a00:f22f:XXXX:YYYY:ZZZ

At the end of /etc/hover-ddns.yaml, I have opendns as public_ip_provider. Is there another one I could try ?

disable_ipv4: false
disable_ipv6: false
cron_expression: "*/15 * * * *"
dns_server: "8.8.8.8:53"
force_update: false
public_ip_provider:
service: opendns

Thanks !

It looks like there is no OpenDNS response received. I'm wondering if there is is an issue with the way I configured the OpenDNS public IP provider. I don't have a real DualStack setup here so that's hard to test for me.
Do the following commands run on the same machine provide your correct public IPv4?
dig +short myip.opendns.com @resolver1.opendns.com
or
dig +short myip.opendns.com @resolver1.opendns.com -4

If you want to use a different provider in the meantime, you have the option to either configure

public_ip_provider:
  service: ipify

or (in case these addresses can be retrieved from a local WAN interface):

public_ip_provider:
  service: local_interface
  interface_name: en0

Which is something, I'm going to add to the Readme now :).

stipus@ventilo:~$ dig +short myip.opendns.com @resolver1.opendns.com
--> returns nothing

stipus@ventilo:~$ dig +short myip.opendns.com @resolver1.opendns.com -4
--> returns my correct ip v4 address

stipus@ventilo:~$ dig +short myip.opendns.com @resolver1.opendns.com -6
--> returns nothing

dig +short myip.opendns.com @resolver1.opendns.com -6 -t "AAAA"
--> returns my correct ip v6 address

Changing public_ip_provider service to ipify finds the right ipv4 address, but doesn't support ipv6

stipus@ventilo:/etc$ hover-ddns -debug -verbose -dry-run -config /etc/hover-ddns.yaml
INFO[0000] Getting public IPv4...
INFO[0000] Received public IP 90.63.XXX.YYY
INFO[0000] Getting public IPv6...
WARN[0000] Failed to get public ip: Provider doesn't support IPv6 yet
INFO[0000] Received public IP
INFO[0000] --- Processing host ventilo.blahblah.com ---
INFO[0000] Resolving current IPv4...
INFO[0000] Received current IPv4 90.63.XXX.YYY
INFO[0000] v4 DNS entry already up to date - nothing to do.

Temporarily, I only need the A record to be correct. I can keep the ipify service. Thanks a lot for the suggestion

Hmm, I've tried on a server with v4 and v6 connectivity and both
dig +short myip.opendns.com @resolver1.opendns.com
and
dig +short myip.opendns.com @resolver1.opendns.com -4
return my current v4 address.
dig +short myip.opendns.com @resolver1.opendns.com -6
does not because I guess OpenDNS doesn't return your v4 address via a v6 DNS request.

Maybe there is something unusual or has changed with your local DNS resolver?

Regardless, I've also made a change to hard-code the IP address of OpenDNS resolvers. I guess there is no good reason to use their hostnames anyway. Could you try the snapshot below again with the opendns config and see if that solves your issue? Thanks!

hover-ddns_v0.5.1-next_Darwin_arm64.tar.gz
hover-ddns_v0.5.1-next_Darwin_x86_64.tar.gz
hover-ddns_v0.5.1-next_Linux_arm64.tar.gz
hover-ddns_v0.5.1-next_Linux_armv6.tar.gz
hover-ddns_v0.5.1-next_Linux_armv7.tar.gz
hover-ddns_v0.5.1-next_Linux_mipsle_softfloat.tar.gz
hover-ddns_v0.5.1-next_Linux_x86_64.tar.gz
hover-ddns_v0.5.1-next_Windows_x86_64.tar.gz

I just so happened to stumble into this problem a minute ago. I can confirm that the snapshot solves the problem!

Thanks for your help - version 0.5.2 has been released now to address this issue.
Closing this now but please feel free to re-open in case there are more problems after all.