What's new

[Solution] ASUSwrt DDNS updater script that works with multi-NAT

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

PPPoE users might not have eth0 as their WAN interface. I recommend replacing it with this code:

Code:
$(nvram get wan0_ifname)
 
  • Like
Reactions: kfp
PPPoE users might not have eth0 as their WAN interface. I recommend replacing it with this code:

Code:
$(nvram get wan0_ifname)

I use AP-mode and your command returns with eth0 like from recent script.

uuuuu@RT-AC68U:/tmp/mnt/2GB_stick# nvram get wan0_ifname
eth0

So for me dont think thats the problem, or?
 
I use AP-mode and your command returns with eth0 like from recent script.

uuuuu@RT-AC68U:/tmp/mnt/2GB_stick# nvram get wan0_ifname
eth0

So for me dont think thats the problem, or?

Not sure what you mean with all the time stuff, but I don’t think it has anything to do with what you’re seeing anyways.

The 60 you saw is probably Asus telling you that that domain has been used/registered already (by you in the past) and appended that number to the name to make it unique. Just try a different name and I bet it’ll work (or heck just use whatever you used with 60 appended like Asus suggested).
 
Last edited:
now with Merlin I get 4 different digits 5357 behind my name. Possibly could be a verification code?

Others should see it in log too, sure not unique to me I think.
Will try it on 86U later and different myname, maybe more luck.
 
Last edited:
Sorry for the confusion. I have updated the instructions to indicate where the commands should be executed from.
 
IP seems to be seen correct but not updated to asus-DDNS, public_IP and MYIP is same as on modem 62.46.xxx.xxx:
zzzzz@RT-AC68U:/tmp/mnt/2GB_stick# sh ./update-ddns-asuswrt.sh
PUBLIC_IP : '62.46.xxx.xxx'
DDNS_IP : '62.47.yyy.yyy'
/tmp/myip : 62.46.xxx.xxx
MYIP : '62.46.xxx.xxx'
Up to this point, the script is able to:
  1. Retrieve the public ip from https://checkip.amazonaws.com/
  2. Execute a dns query with nslookup
  3. Cache the IP in a temp file (/tmp/myip)
used this command for testing update
zzzzz@RT-AC68U:/tmp/mnt/2GB_stick# /usr/sbin/ez-ipupdate -S dyndns -i eth0 -a 62.46.1.1 -h my-name.asuscomm.com -A 2 -s nwsrv-ns1.asus.com
ez-ipupdate Version 3.0.11b5
Copyright (C) 1998-2001 Angus Mackay.
read_input ret: 1
read_input ret: 1
Update failed. (203)

The failure is from another program (ez-ipupdate) use to update DDNS.
Getting ez-ipupdate to work crucial.
Are you able to update with this command?
Code:
/usr/sbin/ez-ipupdate -S dyndns -i eth0 -a 62.46.1.1 -h my-name.asuscomm.com -A 2 -s nwsrv-ns1.asus.com
 
Thank you for your help!

command now successful, but forgot to change username!!!
/usr/sbin/ez-ipupdate -S dyndns -i eth0 -a 62.46.1.1 -h my-name.asuscomm.com -A 2 -s nwsrv-ns1.asus.com
ez-ipupdate Version 3.0.11b5
Copyright (C) 1998-2001 Angus Mackay.
read_input ret: 1
read_input ret: 1
Update IP successful

Using my correct username still gives back error.

So definitely something blocking my old username to be updated on asus side.
With another user seems to work.
Will have to change back in router-mode with a bridged modem and release my username to use it again with your solution in AP-mode.

BTW: in Win10-1803 SSH is included now, no need for putty, just enter SSH in powershell.
I use it since Merlin terminated telnet months ago.
Only sometimes have to delete c:\users\[myuser]\.ssh\known_hosts to have access after changing firmware.
 
Last edited:
I'm having intermittent update problems with ez-ipupdate too, it looks like either ez-ipupdate or ASUS free ddns service is flaky.
Also, ez-ipupdate is insecure as it uses no credentials and unencrypted channel to update ASUS ddns service.

I'm abandoning both ez-ipupdate and ASUS ddns service.

I will use another free ddns service from no-ip.com.
no-ip requires credentials and uses encryption (HTTPS) to update your ddns hostname.
Anyone interested will need to create an account at www.no-ip.com

And update the following variables with no-ip details in update-ddns-asuswrt-noip.sh
Code:
NOIP_USERNAME="[your-username-at-noip.com]"
NOIP_PASSWORD="[your-password-at-noip.com]"
NOIP_DDNS_HOSTNAME="[your-hostname].ddns.net"
..
WGET_USER_AGENT="--user-agent='$SCRIPT_NAME/1 [your-email]'"
 
Last edited:
Can set no-ip on modem (used it long time ago), but you have to validate your account every month within few days, problematic on holidays, so not usable solution in my opinion.

Maybe my problem with old username is because it was set with credentials out of the router and now I want to update it without them.

I made a factory reset after setting username in router-mode, because if you change to AP-mode in GUI it will release username and someone else could use it on his router.
Only with factory it will stay on asus site related to your router for 3 months (but no IP updates of course).

At least we learned something new :confused:
 
Found another free dynamic DNS provider that does not expire free accounts.

Update the following variables with Dynu account details in update-ddns-asuswrt-dynu.sh
Code:
DYNU_PASSWORD="[your-username-at-dynu.com]"
...
DYNU_DDNS_HOSTNAME="[your-hostname].ddnsfree.com"
...
WGET_USER_AGENT="--user-agent='$SCRIPT_NAME/v1+[your-email]'"

Upload following files to Asus router /jffs/ folder:
md5.sh
update-ddns-asuswrt-dynu.sh
 
Hi, I am running this script on RT-AX86U on AP mode.
I have to modify the first line as "#!/bin/sh" to run without error.

Thanks for the script :)
 

Sign Up For SNBForums Daily Digest

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