Cloudflare

Cloudflare

Postby Diejeitor123 » Fri Nov 17, 2023 5:36 pm

Hi:

Its possible to add Cloudflare to DDNS ip updater?
Diejeitor123
Donator VIP
Donator VIP
 
Posts: 48
Joined: Wed Apr 29, 2015 10:30 pm

Re: Cloudflare

Postby Diejeitor123 » Thu Nov 23, 2023 6:11 pm

No answer? :please
Diejeitor123
Donator VIP
Donator VIP
 
Posts: 48
Joined: Wed Apr 29, 2015 10:30 pm

Re: Cloudflare

Postby fvdw » Thu Nov 23, 2023 9:31 pm

I will have a look, but can take a while, I am currently busy with home improvement
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Cloudflare

Postby Jocko » Fri Nov 24, 2023 9:34 am

Hi

I just delved a little deeper into the matter and we can not add this DDNS provider because the cloudfare api does not use login method with its ddns update url.

But you can do it easily yourself (I use this way with OVH):

- create a script file, for example in fvdw share by copying the code available from cloudfare site : https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a
- update it with your settings (email, zone, your DNS, authenticate key), so lines 11 to 18. Do not put space between '=' and your data (so for example dnsrecord=myDDNS)
! Please note the script must not contain windows break lines. You may get them if you create the file from your laptop.
See https://www.commandlinewizardry.com/post/removing-windows-line-breaks
Then after storing the script in fvdw share and editing it, run this command line
Code: Select all
sed -i 's/\r//' /direct-usb/fvdw/cloudflare-ddns-update.sh
(if you use as file name cloudflare-ddns-update.sh)

- set run permissions on the file
Code: Select all
chmod a+x  /direct-usb/fvdw/cloudflare-ddns-update.sh


- create a cron job to send the request at the frequency you want. When you will add a new job, the related job is the path on the script. So: /direct-usb/fvdw/cloudflare-ddns-update.sh
Of course you have to enable cron permanently
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie cloudbox (white casing)

Who is online

Users browsing this forum: No registered users and 1 guest

cron