DDClient not working for Cloudflare

#1

I’m trying to update my IP using DDClient because I have a dynamic IP address.

I’m using the this as my config file

daemon=300
syslog=yes
mail=root
mail-failure=root
pid=/var/run/ddclient.pid
ssl=yes
use=web
web=htps://checkip.net/?CHECKIP
protocol=cloudflare.com
zone=<Foodomain.com>
login=
password=
<foodomain.com>

What happens is whenever I try to update it it always fails right as it’s supposed to update the ip.
I get the IP from the web and when it tries to connect to the cloudflare servers it gets a 301 moved permanently error. Should I change the server in my config file for ddclient?

0 Likes

#2

I don’t use ddclient but it looks good according to the sample:

ssl=yes	
protocol=cloudflare,                           \
server=www.cloudflare.com,                     \
[email protected]                          \
password=my-cloudflare-api-key              \
my-awesome-site.com,

To run in debug mode:

ddclient -daemon=0 -debug -verbose -noquiet

BUT:

There’s a typo. An i am not sure if this one is needed for cloudflare. :thinking:

0 Likes

#3

Ah the typo was probably me I typed it in a rush to head out the door.

Yeah that’s the command I use and it connects to get the correct it address but usually what happens is it will say

“Skipping update from nothing to fooIPaddr”

And I don’t know why it skips.

0 Likes

#4

My ddclient.conf looks like this;
cat /etc/ddclient/ddclient.conf
daemon=120
use=web
ssl=yes
protocol=cloudflare,
login=
password=
zone=domain.com,something.domain.com

One thing I have noticed is that you may need to create the DNS record in Cloudflare first (just set it to any IP address) and ddclient should update it.

Also, what version are you running? I am running 3.9.0.

0 Likes

#5

That’s a good question. I don’t remember the version I’m using. It’s been a while since I updated. I don’t actually remember where I got ddclient in the first place.

If I remember right I believe I did create a DNS record in Cloudflare before.

I had all of this working just fine until I shut down the VM and let it be for two weeks. Then I came back and didn’t remember what I had changed and didn’t log enough useful information in my notes.

0 Likes

#6

Hmm, yeah best check which version it is. If you’re running an older version it may no longer work as the Cloudflare API’s were updated a while back.
In addition try stopping ddclient and removing the file “/var/cache/ddclient/ddclient.cache” then starting it back up again.

0 Likes

closed #7

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

0 Likes