oznu / docker-cloudflare-ddns

A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.
https://hub.docker.com/r/oznu/cloudflare-ddns/
GNU General Public License v3.0
1.08k stars 220 forks source link

ERROR: Failed to update CloudFlare DNS <domain> from X.X.X.X to ;; connection timed out; no servers could be reached #100

Open gui-li opened 2 years ago

gui-li commented 2 years ago

I try the command dig +short myip.opendns.com @resolver1.opendns.com | tr -d '"' in docker, it returns nothing. The resolver1.opendns.com domain is poisoned in China. Could you please provide a more robust and reliable way in getting IP? This link provides a multiple source in getting ip.

gui-li commented 2 years ago

I pass curl -sf4 https://ipinfo.io | jq -r '.ip' to parametrer CUSTOM_LOOKUP_CMD, then it works as expected. I wonder why it can't get the public IP address at https://github.com/oznu/docker-cloudflare-ddns/blob/a96b637d72f025a4d50dbcd4e0321d0300339858/root/app/cloudflare.sh#L53

gui-li commented 2 years ago

The IP_ADDRESSat this line will return ;; connection timed out; no servers could be reached, and it's not equal to "", so it will not execute line 53. PS: CLOUD_FLARE_IPis ;; connection timed out; no servers could be reached