Ddclient errors

Hey guys,
I’m looking for some help configuring ddclient. My config is as follows:

daemon=1800
protocol=cloudflare
use=web
ssl=yes
server=www.cloudflare.com
[email protected]
password=global-api-key
zone=domain.tld
subdomain.domain.tld

When I run “sudo ddclient -daemon=0 -debug -verbose -noquiet” these are the final lines of output:

SENDING: Host: www.cloudflare.com
SENDING: User-Agent: ddclient/3.8.3
SENDING: Connection: close
SENDING:
RECEIVE: HTTP/1.1 403 Forbidden
RECEIVE: Date: Thu, 16 Apr 2020 16:24:06 GMT
RECEIVE: Content-Type: text/plain; charset=UTF-8
RECEIVE: Connection: close
RECEIVE: Set-Cookie: __cfduid=db249f66ab83a337e0151c260e2b6fccf1587054246; expires=Sat, 16-May-20 16:24:06 GMT; path=/; domain=.www.cloudflare.com; HttpOnly; SameSite=Lax; Secure
RECEIVE: Cache-Control: max-age=15
RECEIVE: Expires: Thu, 16 Apr 2020 16:24:21 GMT
RECEIVE: Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct
RECEIVE: Set-Cookie: __cf_bm=2545947bdf1b3cc9b657f641d50a219c37c4aee5-1587054246-1800-AYYHbdrEkR+TKs9SbU0oWC4079r8S2I8LsN1xnwvYtSSp2UGi8ThvivvG6t3RuiFH5z692YfTIrOaAIeGq6DnXw=; path=/; expires=Thu, 16-Apr-20 16:54:06 GMT; domain=.www.cloudflare.com; HttpOnly; Secure; SameSite=None
RECEIVE: Server: cloudflare
RECEIVE: CF-RAY: 584f412fcdabc5f8-EWR
RECEIVE: alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
RECEIVE: cf-request-id: 02256711d80000c5f82130c200000001
RECEIVE:
RECEIVE: error code: 1020

Not sure what I’m doing wrong here.

1 Like

So if memory serves, that’s a Perl script used for dynamic dns zone updating? Or simply for the dynamic DNS itself? Regardless, either way, if that’s the case then using server=www.cloudflare.com in your .conf file may posiible be where the issue lies as CloudFlare as an entity serves 100’s of millions of DNS records to individual clients / zones. Am I on the right path here?

Also I’d like to know - off topic a bit - from CloudFlare why they’ve begun using the new cf-request-id HTTP header in Unix time that translates into the beginnings back in 1970.

All the ddclient configs I’ve seen for Cloudlfare have the server field set to www.cloudflare.com. I’ve also tried donovan.ns.cloudflare.com which is one of my assigned nameservers, the log didn’t show the request going nearly as far.

Have you tried your actual hostname? It just seems odd that it would be www.cloudflare.com for a one size fits all solution. Then again, its Perl…

I’m having the same issue with this as well:

ddclient.conf:

use=web, web=checkip.dyndns.org/, web-skip='IP Address'
daemon=600
syslog=yes

ssl=yes
protocol=cloudflare,
zone=blahblah.com,
ttl=1,
[email protected],
password=*global API token*
blah.com,www.blah.com

sudo ddclient -daemon=0 -debug -verbose -noquiet

output

DEBUG:    url    = https://www.cloudflare.com/api_json.html?a=rec_load_all&z=blahblah.com&[email protected]&tkn=*globalaccesstoken*
DEBUG:    server = www.cloudflare.com
CONNECT:  www.cloudflare.com
CONNECTED:  using SSL
SENDING:  GET /api_json.html?a=rec_load_all&z=blahblah.com&[email protected]&tkn=*globalaccesstoken* 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:  Date: Fri, 17 Apr 2020 16:30:50 GMT
RECEIVE:  Content-Type: text/plain; charset=UTF-8
RECEIVE:  Connection: close
RECEIVE:  Set-Cookie: __cfduid=d96f1b8ecdd5b777628272679f9b2e8b61587141050; expires=Sun, 17-May-20 16:30:50 GMT; path=/; domain=.www.cloudflare.com; HttpOnly; SameSite=Lax; Secure
RECEIVE:  Cache-Control: max-age=15
RECEIVE:  Expires: Fri, 17 Apr 2020 16:31:05 GMT
RECEIVE:  Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
RECEIVE:  Set-Cookie: __cf_bm=8d60d18d8938f77db970ac951fef482689caf823-1587141050-1800-AWj9YfmMbkQeEWLtatMnY/9AeF1brp/QmSzJoPk/80iS7b6ndNoLP0BpCWxhDHPuBI4pyZB8FpVGf1CP7uEdDBM=; path=/; expires=Fri, 17-Apr-20 17:00:50 GMT; domain=.www.cloudflare.com; HttpOnly; Secure; SameSite=None
RECEIVE:  Server: cloudflare
RECEIVE:  CF-RAY: 5857886d8aaae658-LHR
RECEIVE:  alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
RECEIVE:  cf-request-id: 022a9398760000e65878a5d200000001
RECEIVE:
RECEIVE:  error code: 1020

I receive a 404 when I set the server to my domain.

Ah right, classic case of post online for help and immediately figure out the solution:

the version of ddclient on all the debian repos (3.8.3) does not work with cloudflare, it looks like those

https://www.cloudflare.com/api_json.html 

URLs are deprecated.

When I got the latest (forked) version of ddclient from https://github.com/ddclient/ddclient and did a

sudo apt-get install perl libdata-validate-ip-perl
git clone https://github.com/ddclient/ddclient.git
sudo cp -f ddclient/ddclient /usr/sbin/

it worked perfectly because that version uses the correct

https://api.cloudflare.com/client/v4/ 

URLs

6 Likes

You sir, are a gentleman and a scholar.

Here’s my config if anyone else sees this.

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

I also had to move the config to /etc/ddclient/
And my executable was in /usr/sbin, not /usr/bin

1 Like

While this is still open, do either of you know if it’s possible to also update IPv6 (AAAA) records?

Indeed they are.

I do not; however they might very well know how. I applaud your efforts. Please let everyone here know when you’ve completed your work.

I found this project, which seems to work fine. But I’m kinda making the assumption now that it’s not a good idea to have both IPv4 and IPv6 DNS records pointing to your site. I don’t know how most ISPs work but I’d imagine it won’t always be the case that a residential account has both. So I’m just rolling with IPv4 only with ddclient for now.

1 Like

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