Cloudflare DDNS

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

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

Re: Cloudflare DDNS

Post by Lantis »

As per this post (viewtopic.php?p=59708#p59708) a bit further up the page, if you’re trying to update “vpn.domain.com”, the syntax is “vpn@domain.com
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.

wgblondel
Posts: 3
Joined: Mon Jan 25, 2021 7:43 pm
Contact:

Re: Cloudflare DDNS

Post by wgblondel »

I tried everything, I don't know how to make this work.
Is there a way to get a better error message than "Update failed. Ensure your configuration is valid and that you are connected to the internet." ??

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

Re: Cloudflare DDNS

Post by Lantis »

If you would like to provide some details of what you have tried and what hasn't worked, someone might be able to assist you.

I've never really tried it, but i suspect DDNS doesn't work as expected in Wireless Bridge mode. If that's how you're trying to use it, can you also include some details of what you're trying to achieve?
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.

wgblondel
Posts: 3
Joined: Mon Jan 25, 2021 7:43 pm
Contact:

Re: Cloudflare DDNS

Post by wgblondel »

I don't know what details I can give, attached is a screenshot of the options I put. The API key I gave has authorization to modify the DNS zone of the given domain.

The error I always get is "Update failed. Ensure your configuration is valid and that you are connected to the internet.". It would be useful to get the Cloudflare API answer instead.

My router isn't in Wireless bridge mode, it is in Gateway mode and connects to another wifi router (double NAT). Sorry, my signature was old :D

EDIT: it seems I can't attach any image
EDIT2: here is the screenshot https://imgur.com/a/7pppWQC

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

Re: Cloudflare DDNS

Post by Lantis »

I expect your problem is also answered by this post
viewtopic.php?p=59708#p59708

Code: Select all

If you want to update a domain, enter it as "@example.com". If you want to update a subdomain enter it as "sub.domain@example.com".
So in your example (don't know if that's a real domain or dummy data): @2566335.xyz
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.

Swimmer
Posts: 48
Joined: Tue Mar 05, 2013 10:36 am

Re: Cloudflare DDNS

Post by Swimmer »

I'm having the same error.

Code: Select all

Update failed.  Ensure your configuration is valid and that you are connected to the internet.
Using 1.13, installed the extension for cloudflare APIv4, using:

domain name: vpn@mydomain.com
email: cloudflare_user@mydomain.com
API Key: created api token with Edit Zone privileges https://developers.cloudflare.com/api/tokens/create/)
Check: 15
Force Update: 3
IP Source: Internet

any suggestions / debug?
Proud owner of Gargoyle in
  • Tp-Link TL-WR1043N
  • Tp-Link TL-WDR3600
  • Linksys WRT1900ACS

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

Re: Cloudflare DDNS

Post by Lantis »

Try running the script manually with debugging.

Code: Select all

sh /usr/lib/ddns-gargoyle/cloudflare-ddns-helper.sh your@domain.com useremail apikey localip 0 1 0
The last “0” should be changed to “1” if you are trying to update an IPV6 record.
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.

Swimmer
Posts: 48
Joined: Tue Mar 05, 2013 10:36 am

Re: Cloudflare DDNS

Post by Swimmer »

Thank you for the reply.

Code: Select all

+ logger -t cloudflare-ddns-helper 'Cloudflare responded with an error'
+ cat /var/run/cloudflare-ddns-helper.dat
+ logger -t cloudflare-ddns-helper '{"success":false,"errors":[{"code":6003,"message":"Invalid' request 'headers","error_chain":[{"code":6103,"message":"Invalid' format 'for' X-Auth-Key 'header"}]}],"messages":[],"result":null}'
+ return 1
+ exit 3
Proud owner of Gargoyle in
  • Tp-Link TL-WR1043N
  • Tp-Link TL-WDR3600
  • Linksys WRT1900ACS

Swimmer
Posts: 48
Joined: Tue Mar 05, 2013 10:36 am

Re: Cloudflare DDNS

Post by Swimmer »

@lantis, I have found the issue and I was able to create a similar script but I'm having issues "greping" in busybox.

I'm currently using the following grep to identify the ID needed to update the record.

```
grep -Po '(?<="id":")[^"]*')
```
Any suggestions on replacing the grep to something busybox can understand?

The main issue is regarding authentication.
The API want a Bearer token and not a X-Auth-Key
Proud owner of Gargoyle in
  • Tp-Link TL-WR1043N
  • Tp-Link TL-WDR3600
  • Linksys WRT1900ACS

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

Re: Cloudflare DDNS

Post by Lantis »

Just to clarify, you want to use an API token instead of the API Keys? The script is designed to be used with the "Global API Key" generated for your account and shouldn't require any mods to make that happen.

If you want to use the API Token, I'll probably need a full sample of the interaction to try and help you with your grep.
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