What's new

Command Line Questions for Stock ASUS Firmware - RT AX86U Pro and DDNS

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

AndrewL733

Occasional Visitor
Hello,

I have an ASUS RT AX86U Pro running the latest stock firmware -- 3.0.0.6.102_34314. I would like to avoid running Merlin if possible.

My router is behind another ISP fiber router so I have a double NAT issue (I tried PPPOE but I lose my IP address periodically and never get a new one). The ASUS router has no problem getting my Public IP address with double NAT. However, the ASUS router doesn't notice if my Public IP Address changes (unless my ISP Router is rebooted or gets disconnected). Therefore, it's only a matter of time before my Public IP no longer matches what the ASUS router told my DDNS provider when the ASUS first booted up.

I have written a script that checks to see if my Public IP has changed. Long story short, I had to create a cron job that runs every 5 minutes, that runs an intermediate script that does nothing more than run the Public IP Check script. I could not run the Public IP Check script directly from cron because curl and wget were unable to fetch any information. Apparently, there are severe limitations on what you can do directly with a script called by cron. But so long as the intermediate script stays within the bounds of what you can do with cron, you can use that to call the script you actually want to run.

Anyway, now I want to force the ASUS router to update my DDNS provider if a change in Public IP is detected. I was hoping there was something like "service restart_ddns" but that doesn't seem to exist. Does anybody know what the command(s) would be. If there isn't any direct way to restart DDNS, do you have any other suggestions (besides rebooting the router, which would be a last resort)?

While I'm on the subject of ASUS command line options, I also have a couple of other questions:

1. The stock ASUS firmware doesn't have any sendmail or msmtp client for sending out email notifications. Has anybody been successful compiling msmtp for aarm64 and running it on the router? There is plenty of space to store a hefty binary on the jffs partition, and I'd rather not install entware on a separate USB stick.

2. I'm also looking for a command that force my router to switch from one WAN interface to another. I have Dual WAN enabled. It works okay for failover, but usually it doesn't fail back to the Primary WAN interface when that comes back up (in fact, the Primary often ends up being down and sometimes I have to remotely reboot my ISP router to make the ASUS see it again. But sometimes the Primary WAN just sits in Hot Standby while my Internet flows over a LTE Modem (my Secondary WAN). I wrote a script to detect which WAN interface I'm routing through, but now I'd like to force things to go back to the Primary when it's available..

Not to be insulting to the Asuswrt-Merlin folks but I have read through the "alternative" Dual WAN script that they tout as superior to the ASUS Dual WAN feature. I'm sure it took the author a long time to write it, and improve it, but it's so long and convoluted I just don't feel comfortable running it on my router. I like scripts under 30 or 40 lines max.
 
I was hoping there was something like "service restart_ddns" but that doesn't seem to exist. Does anybody know what the command(s) would be. If there isn't any direct way to restart DDNS, do you have any other suggestions
It should work if ddns is configured on the router. What do you see in the system log after running it?
 

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