What's new
  • 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!

Asuswrt-Merlin custom DDNS and DDNS-START script

H225flyer

New Around Here
Hi there,

I have an Asus RT-N66U (with the latest Asuswrt-Merlin firmware) router that is running behind my new ISP's Huawei HG8247H (ONT) router/modem.
As the router module of the HG8247H is notoriously buggy (and I also wanted to use the RT-N66U’s VPN service) I am running it in bridge mode.
Everything is working well except my DYNDNS service which is updated with an incorrect ip.
The public ip assigned to the RT-N66U by my ISP is normally in the range of 100.70.xxx.xxx while my real public ip is 124.122.xxx.xxx
After more troubleshooting I found out that my ISP is running a carrier grade NAT service which explain the problem.

My service provider understand the issue and are willing to temporarily remove me from their NAT however they told me that unfortunately I would be most likely put back automatically every time they make an update/upgrade.
To save me this trouble I am now trying to use the “DDNS-START” script to update DYNDNS with a correct ip instead.
My first script (I am a newbie in sh scripting) is running (confirmed by the log) however the wget doesn’t seems to receive any argument back from DYNDNS, and as a result the update fail.

Can someone help me with issue please?

Here is my script:

#!/bin/sh
#

username=xxxxxxxxx
password=xxxxxxxxx
hostname=xxxxxxx.dyndns.org

IP=$(wget -O - -q http://myip.dnsomatic.com/)

URL="http://$username:[email protected]/nic/update?hostname=$hostname&myip=$IP&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"

logger "wan ip:"
logger $IP

ANSWER=$(wget --no-check-update -q "$URL")

logger "ANSWER"
logger $ANSWER

if ["$ANSWER" == "good"]||["$ANSWER" == "nochg"]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi


Thanks!
 
Last edited:

Similar threads

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