[question] ddns not able to connect to cloudflare api
kurti500 opened this issue · 4 comments
Great project, got everything up and running, vaultwarden is accessible, but also configured DDNS with cloudflare, which seems not to work with following log message:
ddns | FAILED: updating xx.domain.xx: Could not connect to api.cloudflare.com/client/v4.
my ddclient.conf looks like this
use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
CloudFlare (www.cloudflare.com)
protocol=cloudflare
zone=xxx.de
ttl=0
login=token # Only needed if you are using your global API key. If you are using an API token, set it to "token" (wihtout double quotes).
password=APItoken# # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones".
xx.xxx.de
Did anybody experience this as well and has a hint how to fix this, looks like ddns has no access to the web?!
Thanks!
I'm seeing the same behavior in my logs. If I jump into the running container (docker exec -it ddns ash
) I can communicate to the internet - even to dyndns which is what I also use. Not sure what's going on, I'll poke around a bit.
Also, try running ddclient -file /config/ddclient.conf -daemon=0 -debug -verbose -noquiet
in the ddns container and see what you get
I was able to resolve it for myself, hope this helps you @kurti500.
When I ran the command above in docker to get the verbose log of ddclient, it spit out this error message:
RECEIVE: {"success":false,"errors":[{"code":9103,"message":"Unknown X-Auth-Key or X-Auth-Email"}],"messages":[],"result":null}
That meant that my auth email (not using a token like you) was wrong, which is true, I did update it with Cloudflare a few weeks ago. Updating that solved it for me.
As an aside, I was getting a lot of errors that I couldn't connects to dyndns.org, so I updated my use line to use domains.google.com/checkup
, like so:
use=web, web=domains.google.com/checkip
I hope this helps. The command above should get you more details about where ddclient is failing wrt cloudflare.
Hi @dadatuputi , thanks a lot for your support, it works perfectly with the global API key, so I recreated the API for the DNS change and it works again, so I assume something got wrong with this key......
However when changing to
use=web, web=domains.google.com/checkip
I got following error
WARNING: found neither IPv4 nor IPv6 address
ddns | Use of uninitialized value $_[2] in sprintf at /usr/bin/ddclient line 2160.
Any thoughts why the google URL is not working for me? Is there any other config needed?
UPDATE:
works now either with
use=web, web=https://domains.google.com/checkip, web-skip='IP Address'
or with adding parameter 'ssl=yes' set, this was missing in my conf file.
Case closed, DDNS working as expected now :-)
Thanks!