What's new

DDNS (DYNU) Stuck in processing

  • 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!

s0nlxaftrsh0ck

New Around Here
Hey all, I've been scouring the forums and have been trying to recreate/apply the ddns-script like I've seen but for some reason it's still stuck in processing. I've used the following posts for guidance


Here is an example of my script below with some comments in it.

Bash:
#!/bin/sh
#
# https://www.dynu.com/en-US/DynamicDNS/IP-Update-Protocol
# Note: To get your domain id, send a GET request to /dns/ with your API key in the header.

touch /tmp/testScript

HOSTNAME=example.domain.com
GROUP=Main
PASSWORD=theAPIKeyHere1234
DOMAIN_ID=####### Got the Domain ID from the CURL Get Command
IP=${###.##.##.###} #This part I'm a bit confused on as I use the IP address DynuDNS gives me
IPsix=null # I'm not using IPV6
URL="https://api.dynu.com/v2/dns/${DOMAIN_ID}"

JSON_TEMPLATE='{"name":%s,"group":%s,"ipv4Address":%s,"ipv6Address":%s}'
JSON=$(printf "$JSON_TEMPLATE" "$HOSTNAME" "$GROUP" "$IP" "$IPsix")

curl -s -o /dev/null -w "%{HTTP_CODE}" --location --request POST "$URL" -H "Content-Type:application/json" -H "accept: application/json" -H "API-KEY: $PASSWORD" -d $JSON

if [ $HTTP_CODE==200 ];then
  /sbin/ddns_custom_updated 1
else
  /sbin/ddns_custom_updated 0
fi

And it just stays stuck in this spot
1651717399561.png


1651596646541.png

1651596916883.png

I restarted my router and the testScript file was indeed written to tmp however it keeps going in a loop of processing the DDNS and this is what I find in the logs.

Code:
May  3 12:45:00 rc_service: service 9027:notify_rc restart_letsencrypt
May  3 12:45:00 rc_service: service 9027:notify_rc restart_letsencrypt
May  3 12:45:00 custom_script: Running /jffs/scripts/service-event (args: restart letsencrypt)
May  3 12:45:00 Let's_Encrypt: Err, DDNS update failed.
May  3 12:47:08 rc_service: httpds 1472:notify_rc restart_ddns_le
May  3 12:47:08 custom_script: Running /jffs/scripts/service-event (args: restart ddns_le)
May  3 12:47:08 start_ddns: update CUSTOM , wan_unit 0
May  3 12:47:08 start_ddns: Clear ddns cache.
May  3 12:47:08 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:47:15 watchdog: start ddns.
May  3 12:47:15 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:47:15 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:47:15 start_ddns: update CUSTOM , wan_unit 0
May  3 12:47:15 start_ddns: Clear ddns cache.
May  3 12:47:15 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:47:45 watchdog: start ddns.
May  3 12:47:45 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:47:45 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:47:45 start_ddns: update CUSTOM , wan_unit 0
May  3 12:47:45 start_ddns: Clear ddns cache.
May  3 12:47:45 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:48:15 watchdog: start ddns.
May  3 12:48:15 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:48:15 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:48:15 start_ddns: update CUSTOM , wan_unit 0
May  3 12:48:15 start_ddns: Clear ddns cache.
May  3 12:48:15 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:48:45 watchdog: start ddns.
May  3 12:48:45 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:48:45 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:48:45 start_ddns: update CUSTOM , wan_unit 0
May  3 12:48:45 start_ddns: Clear ddns cache.
May  3 12:48:45 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:49:15 watchdog: start ddns.
May  3 12:49:15 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:49:15 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:49:15 start_ddns: update CUSTOM , wan_unit 0
May  3 12:49:15 start_ddns: Clear ddns cache.
May  3 12:49:15 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:49:45 watchdog: start ddns.
May  3 12:49:45 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:49:45 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:49:45 start_ddns: update CUSTOM , wan_unit 0
May  3 12:49:45 start_ddns: Clear ddns cache.
May  3 12:49:45 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:50:00 rc_service: service 9775:notify_rc restart_letsencrypt
May  3 12:50:00 custom_script: Running /jffs/scripts/service-event (args: restart letsencrypt)
May  3 12:50:00 Let's_Encrypt: Err, DDNS update failed.
May  3 12:50:15 watchdog: start ddns.
May  3 12:50:15 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:50:15 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:50:15 start_ddns: update CUSTOM , wan_unit 0
May  3 12:50:15 start_ddns: Clear ddns cache.
May  3 12:50:15 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:50:45 watchdog: start ddns.
May  3 12:50:45 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:50:45 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:50:45 start_ddns: update CUSTOM , wan_unit 0
May  3 12:50:45 start_ddns: Clear ddns cache.
May  3 12:50:45 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:51:15 watchdog: start ddns.
May  3 12:51:15 rc_service: watchdog 1501:notify_rc start_ddns watchdog
May  3 12:51:15 custom_script: Running /jffs/scripts/service-event (args: start ddns)
May  3 12:51:15 start_ddns: update CUSTOM , wan_unit 0
May  3 12:51:15 start_ddns: Clear ddns cache.
May  3 12:51:15 custom_script: Running /jffs/scripts/ddns-start (args: <WAN IP>)
May  3 12:51:45 watchdog: DDNS Retry reach MAX.(0), DDNS Recover Time set 39
May  3 12:55:00 rc_service: service 10584:notify_rc restart_letsencrypt
May  3 12:55:00 custom_script: Running /jffs/scripts/service-event (args: restart letsencrypt)
May  3 12:55:00 Let's_Encrypt: Err, DDNS update failed.

Please let me know if I've missed anything or if I've messed up somewhere... I've left this thing running for a weeks to months and this DDNS still has not resolved. I've updated to the latest firmware on Merlin as well RT-AX88U_386.5_2
 
Last edited:
I got dynu working with the following code:

I think it might be because you are not using "" on the api password and domain id.

Code:
#!/bin/sh
#
# https://www.dynu.com/en-US/DynamicDNS/IP-Update-Protocol
# Note: To get your domain id, send a GET request to /dns/ with your API key in the header.

HOSTNAME=\"######.ddnsfree.com\"
GROUP=\"\"
PASSWORD="################################"
DOMAIN_ID="#######"
IP=\"${1}\"
IPsix=null

URL="https://api.dynu.com/v2/dns/${DOMAIN_ID}"

JSON_TEMPLATE='{"name":%s,"group":%s,"ipv4Address":%s,"ipv6Address":%s}'
JSON=$(printf "$JSON_TEMPLATE" "$HOSTNAME" "$GROUP" "$IP" "$IPsix")

curl -s -o /dev/null -w "%{HTTP_CODE}" --location --request POST "$URL" -H "Content-Type:application/json" -H "accept: application/json" -H "API-KEY: $PASSWORD" -d $JSON

if [ $HTTP_CODE==200 ];then
  /sbin/ddns_custom_updated 1
else
  /sbin/ddns_custom_updated 0
fi
 
I got dynu working with the following code:

I think it might be because you are not using "" on the api password and domain id.

Code:
#!/bin/sh
#
# https://www.dynu.com/en-US/DynamicDNS/IP-Update-Protocol
# Note: To get your domain id, send a GET request to /dns/ with your API key in the header.

HOSTNAME=\"######.ddnsfree.com\"
GROUP=\"\"
PASSWORD="################################"
DOMAIN_ID="#######"
IP=\"${1}\"
IPsix=null

URL="https://api.dynu.com/v2/dns/${DOMAIN_ID}"

JSON_TEMPLATE='{"name":%s,"group":%s,"ipv4Address":%s,"ipv6Address":%s}'
JSON=$(printf "$JSON_TEMPLATE" "$HOSTNAME" "$GROUP" "$IP" "$IPsix")

curl -s -o /dev/null -w "%{HTTP_CODE}" --location --request POST "$URL" -H "Content-Type:application/json" -H "accept: application/json" -H "API-KEY: $PASSWORD" -d $JSON

if [ $HTTP_CODE==200 ];then
  /sbin/ddns_custom_updated 1
else
  /sbin/ddns_custom_updated 0
fi
Oh! Am I supposed to leave the ' \" ' sandwiched in like that? It looked so disjointed to me so I left them out assuming that it was just a place holder. Example below.

Code:
\"####.DomainHere.com\"

And for the DDNS IP address I'm adding in the DDNS IP address correct? Thank you for replying btw!!!

I have dynu.net working through dnsomatic without any scripting.
Oh shoot. Is there any tutorials for it or is it pretty straight forward?

Edit 1:
@Spear_UK
Tried your script and still getting the same result. I changed some options around namely under "Webui SSL Certificate"

Item: Original > New Setting
Method to retrieve WAN IP: External > Internal
HTTPS/SSL Certificate: Free Certificate from Let's Encrypt > None
Generate a new certificate: Yes > No

Once I set those I got the following

Status : Active

Edit 2:
Seems like I messed up with the domain part of it. I created my own domain instead of doing it with that ddnsfree.com like you did I deleted the made domain and made a new one with ####.ddnsfree.com. Added the following into my /jffs/scripts/ddns-start

HOSTNAME=\"MyNewHostname.ddnsfree.com\"
GROUP=\"\"
PASSWORD="The API Password from the site"
DOMAIN_ID="New Domain ID got through CURL"
IP=\"${NewIPAddress}\"

I left the certificate off as None and to generate a new one but it still seems the Yellow Exclamation mark on my DDNS.

Edit 3:
Seems like I got it working! I needed to leave the IPV4 address as \"{1}\"

So lessons learned on this leave most of the script as is and only adjust the first 4 fields. Just edit the text! Leave the rest for whoever stumbles across this post!

HOSTNAME=\"example.com\"
GROUP=\"yourGroup\"
PASSWORD=yourAPIKey
DOMAIN_ID=yourDomainID

Also when making a new DYNU account don't make your own domain. I did it using Ddnsfree.com or choose any of the domains in that list. Thanks everyone
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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