Cloudflare not working for DDNS

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
butler360
Posts: 10
Joined: Fri Nov 08, 2013 3:40 am

Cloudflare not working for DDNS

Post by butler360 »

I tried to set up Cloudflare DDNS for the first time today and it is not working. Doing some research it seems they updated their API in the last week or two. It looks like the address and the parameters have changed.

Making it more complicated, it seems the record ID is required, and for a subdomain it seems an additional entry is required ("name"). I am not sure quite how the ddns_gargoyle binary works, but I hope someone can make this work because it's a pretty excellent and free provider!

Here's a working manual curl from command line:

Code: Select all

curl https://www.cloudflare.com/api_json.html \
	-d 'a=rec_edit' \
	-d 'tkn=API_KEY_HERE' \
	-d 'email=EMAIL_HERE' \
	-d 'z=DOMAIN_HERE' \
	-d 'type=A' \
	-d 'name=SUBDOMAIN_HERE' \
	-d 'id=ID_HERE' \
	-d 'content=IP_HERE' \
	-d 'service_mode=0' \
	-d 'ttl=1'
Here's how I got the record ID:

Code: Select all

curl https://www.cloudflare.com/api_json.html \
	-d 'a=rec_load_all' \
	-d 'tkn=API_KEY_HERE' \
	-d 'email=EMAIL_HERE' \
	-d 'z=DOMAIN_HERE''

gabriel147
Posts: 1
Joined: Thu Jun 16, 2016 6:06 am

Re: Cloudflare not working for DDNS

Post by gabriel147 »

butler360 wrote:I tried to set up Cloudflare DDNS for the first time today and it is not working. Doing some research it seems they updated their API in the last week or two. It looks like the address and the parameters have changed.

Making it more complicated, it seems the record ID is required, and for a subdomain it seems an additional entry is required ("name"). I am not sure quite how the ddns_gargoyle binary works, but I hope someone can make this work because it's a pretty excellent and free provider!

Here's a working manual curl from command line:

Code: Select all

curl https://www.cloudflare.com/api_json.html \
	-d 'a=rec_edit' \
	-d 'tkn=API_KEY_HERE' \
	-d 'email=EMAIL_HERE' \
	-d 'z=DOMAIN_HERE' \
	-d 'type=A' \
	-d 'name=SUBDOMAIN_HERE' \
	-d 'id=ID_HERE' \
	-d 'content=IP_HERE' \
	-d 'service_mode=0' \
	-d 'ttl=1'
Here's how I got the record ID:

Code: Select all

curl https://www.cloudflare.com/api_json.html \
	-d 'a=rec_load_all' \
	-d 'tkn=API_KEY_HERE' \
	-d 'email=EMAIL_HERE' \
	-d 'z=DOMAIN_HERE''
Cloudflare review
The Problem is complicated but the the expert can definitely help you out.

Post Reply