Cloudflare not working for DDNS
Posted: Thu Jan 29, 2015 8:55 pm
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:
Here's how I got the record ID:
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'
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''