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.
And it just stays stuck in this spot
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.
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
Asus RT-AC68U (AsusWRT) DDNS problem
It seems that I would need some help getting DDNS to work with AsusWRT 380.65. I am using an Asus RT-AC68U router, which is behind another router (and therefore does not get an external IP itself). I am using http://www.dynu.com as the dynamic DNS service. Dynu.com lets the hostname be updated...
www.snbforums.com
User scripts
Third party firmware for Asus routers (newer codebase) - RMerl/asuswrt-merlin.ng
github.com
DDNS Sample Scripts
Third party firmware for Asus routers (newer codebase) - RMerl/asuswrt-merlin.ng
github.com
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
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: