Hey Forum. I've been desperately trying to get custom DDNS to work and finally gave up and am looking for help from you all. Chances are someone will know what's going on from looking at the logs (below) but I cant figure it out. Hoping for an easy fix... thanks in advance for the help!
My Setup:
1. Added the following script named `ddns-start` to `/jffs/scripts` directory on router via SSH (Obviously {{Redacted}} has a value):
2. Ran the code directly in the terminal to verify success which results in the following (I've faked the WANIP here since ${1} had no value when run directly in terminal but I've set the variable manually and run it to confirm no issues with the script structure):
3. Navigated to AsusWRT Merlin interface on router /Advanced_ASUSDDNS_Content.asp to setup DDNS with the following Attributes:
Show a loop of the following ({{REDACTED}} shows WANIP:
My Setup:
- RT-AC68U
- Firmware Version:384.8_2
1. Added the following script named `ddns-start` to `/jffs/scripts` directory on router via SSH (Obviously {{Redacted}} has a value):
Code:
#!/bin/sh
#setting variables
SUBDOMAIN="{{REDACTED}}"
TOKEN="{{REDACTED}}"
WANIP=${1}
# to get WAN externally
## WANIP=$(curl --silent http://api.ipify.org/)
echo "WANIP is $WANIP"
# updating IP
curl "https://njal.la/update/?h=$SUBDOMAIN&k=$TOKEN&a=$WANIP"
echo "result is $?"
# reporting results to router
if [ $? -eq 0 ];
then
echo "update success"
/sbin/ddns_custom_updated 1
else
echo "update failure"
/sbin/ddns_custom_updated 0
fi
2. Ran the code directly in the terminal to verify success which results in the following (I've faked the WANIP here since ${1} had no value when run directly in terminal but I've set the variable manually and run it to confirm no issues with the script structure):
Code:
XXXX@RT-AC68U-F048:/jffs/scripts# sh ddns-start
WANIP is {REDACTED}
{"message": "record updated", "value": {REDACTED}, "status": 200} #response from nja.la
result is 0
update success
3. Navigated to AsusWRT Merlin interface on router /Advanced_ASUSDDNS_Content.asp to setup DDNS with the following Attributes:
- Enable the DDNS Client = Yes
- Method to retrieve WAN IP= Internal
- Server=Custom
- Host Name={{Redacted}} -- doesnt matter anyways since it's specified in the script as `subdomain`
- Forced update interval (in days)=21
- HTTPS/SSL Certificate=none
- Assuming all above preconditions click "Apply"
- ACTUAL: Layer comes up and says "UPDATING" and never goes away and is never successful (See logs below)
- I can force the UI to "successful" state by manually running the script in ssh.
- EXPECTED: Custom Script applied successfully without manual intervention
Show a loop of the following ({{REDACTED}} shows WANIP:
Code:
Jan 3 20:46:22 rc_service: watchdog 273:notify_rc start_ddns
Jan 3 20:46:22 start_ddns: update CUSTOM , wan_unit 0
Jan 3 20:46:22 custom_script: Running /jffs/scripts/ddns-start (args: {{REDACTED}} ) - max timeout = 120s
Jan 3 20:46:52 watchdog: start ddns.
Jan 3 20:46:52 rc_service: watchdog 273:notify_rc start_ddns
Jan 3 20:46:52 start_ddns: update CUSTOM , wan_unit 0
Jan 3 20:46:52 custom_script: Running /jffs/scripts/ddns-start (args: {{REDACTED}} ) - max timeout = 120s
Jan 3 20:47:22 watchdog: start ddns.
Jan 3 20:47:22 rc_service: watchdog 273:notify_rc start_ddns
Jan 3 20:47:22 start_ddns: update CUSTOM , wan_unit 0
Jan 3 20:47:22 custom_script: Running /jffs/scripts/ddns-start (args: {{REDACTED}} ) - max timeout = 120s
Jan 3 20:47:52 watchdog: start ddns.
Jan 3 20:47:52 rc_service: watchdog 273:notify_rc start_ddns
Jan 3 20:47:52 start_ddns: update CUSTOM , wan_unit 0
Jan 3 20:47:52 custom_script: Running /jffs/scripts/ddns-start (args: {{REDACTED}} ) - max timeout = 120s
Last edited: