Configuring DynDNS for CloudFlare

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Configuring DynDNS for CloudFlare

Post by nathank »

Hi Folks,

im a a bit confused as to what to put in these fields. I can see from a previous thread, that it should work, but need a little guidance please.

Domain Name: e.g. mydomain<dot>com<dot>au (excluding the A record to be updated?)
API Key: is my global API key from cloudflare
Key: no idea what this field is for? but i'm guessing its different from the CA API?

Where do you specify the host / A record to be updated?

thanks in advance.

Nathan

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Re: Configuring DynDNS for CloudFlare

Post by nathank »

Mod:- can someone check with the dev that wrote the code?

Tia!

-nat

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Re: Configuring DynDNS for CloudFlare

Post by nathank »

nad, is there anyway i can get some more detailed debugging?

From the SSH console, if i do logread -f, all i see is:
Sat Jan 6 21:55:52 2018 user.info syslog: Could not determine local ip from url: http://checkmyip.com
Sat Jan 6 21:55:52 2018 user.info syslog: Successfully retrieved local ip from url: http://www.ipchicken.com
Sat Jan 6 21:55:56 2018 user.info syslog: Successfully retrieved local ip from url: http://www.tracemyip.org

thanks :c)

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Configuring DynDNS for CloudFlare

Post by Lantis »

It should be the "ID" of the domain you're trying to update.
I believe that cloudflare assigns an ID to each domain you have. Not sure what format or where to get it.

Currently the script only supports updating the top level domain i.e. example.com, not subdomain.example.com

Since it is a paid service, i can't help you any further unless you're willing to loan me access to your account to test. I find their API documentation rubbish.

Another user suggested using DNS o matic
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Re: Configuring DynDNS for CloudFlare

Post by nathank »

Hey Lantis! thanks for the reply.

Cloudflare do free accounts now for 1 domain, including basic protection and DNS hosting. I've just moved there from godaddy for my personal hosting - so there is a free service, not just paid!

RE Gargoyle - Somewhere in the dyn dns form, i would think you need to specify the string of the A record that you want to update for the domain, no?

Updating the IP of just the domain root wouldn't be very useful? i couldn't think why you'd want to do that? (maybe I'm a bit daft and misunderstood the use case!)

My guess would be that most people would want to do something like dynamic-host.domain.com - like you do with afraid.org?

Also the "key" is now called the ZoneID, so might be worth fixing that in a subsequent release.

I tried just the root domain (i.e. domain.com, no leading host record) and the zoneid - and its failing still mate. I am happy to PM you the login details for my cloudflare account / domain if you want to have a poke around and give it a crack?

RE DNS-o-Matic, cloud flare is throttling their requests, so the update service is broken, hence why I went this route to update it directly :(

Thanks for the response!!

-nat

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Configuring DynDNS for CloudFlare

Post by Lantis »

I’ll get back to you.
If it’s a free service then I’ll throw my own domain at it and try to sus it out.

I’m back to work as of tomorrow so will be a slowdown from me.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Re: Configuring DynDNS for CloudFlare

Post by nathank »

hey Lantis - understand, i am too, after two weeks off :(

let me know if there is anything you need, and thanks for your ongoing work on this project.

-nat

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Configuring DynDNS for CloudFlare

Post by Lantis »

I’m trying to work through their new API. Once I get that to work I can try to go back to the undocumented API we are using in Gargoyle.
I have a support ticket open chasing a problem I’m having with getting it to work.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

nathank
Posts: 6
Joined: Wed Jan 03, 2018 7:41 pm

Re: Configuring DynDNS for CloudFlare

Post by nathank »

great! thanks for the update!

super excited to see this working, i think its a great contribution to the project mate.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Configuring DynDNS for CloudFlare

Post by Lantis »

So i *think* you can't do it with the old API anymore (or i'm not clever enough to figure out how).

I've started porting over a script from Openwrt that can be used with Gargoyle.
The script is finished but i haven't integrated it into the GUI and back end yet (by far the hardest part). But you can start using the script now if you like.

Script is available here:
http://lantisproject.com/gargoyle_scrip ... -helper.sh
Put it on the router at /usr/lib/ddns-gargoyle/ (you may need to create this folder).

You need to have installed: curl, ca-certificates

Code: Select all

gpkg update
gpkg install curl
gpkg install ca-certificates
Invoke the script as follows:

Code: Select all

sh /usr/lib/ddns-gargoyle/cloudflare-ddns-helper.sh yourcloudflareemail@example.com yourAPIKEY subdomain@yourdomainexample.com yourWANip 1
Note that for the moment it doesn't auto grab your WAN ip yet. you just feed this info into it.
Then run a "logread" and you should see the output.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply