Ddclient error 403 and 1020

I cannot update the DNS A record IP address with ddclient. When ddclient runs, errors 403 and 1020 appear.


CONNECT: www.cloudflare.com
CONNECTED: using SSL
SENDING: GET /api_json.html?a=rec_load_all&z=example.com&email=[email protected]&tkn=[cloudflare global api key] HTTP/1.0
SENDING: Host: www.cloudflare.com
SENDING: User-Agent: ddclient/3.8.3
SENDING: Connection: close
SENDING:
RECEIVE: HTTP/1.1 403 Forbidden

RECEIVE: error code: 1020

Hang on. That says you’re connecting to www.Cloudflare.com instead of api.Cloudflare.com. That may the cause of the 403.

I changed the ddclient.conf file. Here is the result:

CONNECT: api.cloudflare.com
CONNECTED: using SSL
SENDING: GET /api_json.html?a=rec_load_all&z=example.com&[email protected]&tkn=[cloudflare global api key] HTTP/1.0
SENDING: Host: api.cloudflare.com
SENDING: User-Agent: ddclient/3.8.3
SENDING: Connection: close
SENDING:
RECEIVE: HTTP/1.1 404 Not Found

The “SENDING” syntax doesn’t look correct. Updates are a PUT, and new records are a POST.

https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record

That is generated by ddclient. I do not see a way to change that.

The recommend configuration for ddclient is outlined in this post:

daemon=1800
syslog=yes
protocol=cloudflare
use=web
web=checkip.dyndns.org/
web-skip=‘IP Address’
ssl=yes
[email protected]
password=global-api-key
zone=domain.tld
domain.tld,*.domain.tld

It has the server set to www.cloudflare.com. I do not see a line where the server is set to api.cloudflare.com,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.