What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Asus DDNS Cloudflare

GiveMeAName

New Around Here
Hi,

I appear to be having issues with getting the ddns-start to work,

I am using the below script named ddns-start in the location
/jffs/scripts/, which when ran does not seem to throw any errors, however my cloudflare dns does not appear to update. In addition I have set the DDNS in the routers GUI to enabled, custom and have the hostname set to to the domain i wish to use but it is currently saying "Request Error! Please try again" every time i go back onto the DDNS page.

I have tried factory restoring the router but to no avail. any help on where I am going wrong would be greatly appreciated

EMAIL="REDACTED"
ZONEID="REDACTED"
API="REDACTED"
RECORDID="REDACTED"
RECORDNAME="REDACTED"
IP=${1}

curl -fs -o /dev/null -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONEID/dns_records/$RECORDID" \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $API" \
-H "Content-Type: application/json" \
--data "{\"type\":\"A\",\"name\":\"$RECORDNAME\",\"content\":\"$IP\",\"ttl\":120,\"proxied\":false}"

if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi
 
If you are prepared to go back to the drawing board on DDNS, you could set up Asus' own DDNS (a tab in the WAN page). It could not possibly be easier to set up, or more foolproof, and in the several years I've been using it there has not been a single glitch.
 
If you are prepared to go back to the drawing board on DDNS, you could set up Asus' own DDNS (a tab in the WAN page). It could not possibly be easier to set up, or more foolproof, and in the several years I've been using it there has not been a single glitch.

Hi Martinr,

Thanks for the response, I used to use it actually and I will agree it was reliable, but since most if not all of my DNS entries go through CloudFlare I was trying/hoping to centralize everything, and since the option for DDNS is apparently available through CloudFlare API I thought I'd apply the function.

My job is with computers as a technician/sysadmin so I'm looking at this as more of an if its possible id like to apply it and learn just how this functions and where i'm going wrong, whats baffling me really is the script appears to run (does not kick out any errors) but just does not update the DNA "A" entry, so was hoping for some help or steering in the right direction so to speak.
 
Hi Martinr,

Thanks for the response, I used to use it actually and I will agree it was reliable, but since most if not all of my DNS entries go through CloudFlare I was trying/hoping to centralize everything, and since the option for DDNS is apparently available through CloudFlare API I thought I'd apply the function.

My job is with computers as a technician/sysadmin so I'm looking at this as more of an if its possible id like to apply it and learn just how this functions and where i'm going wrong, whats baffling me really is the script appears to run (does not kick out any errors) but just does not update the DNA "A" entry, so was hoping for some help or steering in the right direction so to speak.


Many thanks, and welcome to the forum. I fully understand: a challenge to be overcome. I'm quite sure one of the many gifted forum members will help you crack it.

By the way, if you've already tried using the forum's search facility, I also find it's worth doing a separate search of the forum in Google with the same search terms, adding something like "asus merlin forum" or "rmerlin".
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top