What's new

Custom DDNS not working, used to

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

Shoikan

New Around Here
Hello there,

I'll try to be brief with my problem.
I have a RT-AC68U that used to be my main router. Now I just bought a RT-AX58U that works really well. The old RT-AC68U is configured as an AiMhesh node with wired backhaul, both with 384.17 firmware and everything is fine, or almost.

On my RT-AC68U I used a custom DDNS script with the changeip.com provider and never had a problem. This is the script:

Code:
#!/bin/sh

USERNAME="someuser"
PASSWORD="somepassword"
HOSTNAME="somehostname"

curl -fs -o /dev/null "https://nic.changeip.com/nic/update?u=${USERNAME}&p=${PASSWORD}&hostname=${HOSTNAME}"

if [ $? -eq 0 ]; then
  /sbin/ddns_custom_updated 1
else
  /sbin/ddns_custom_updated 0
fi

The thing is when I set up the new RT-AX58U this never worked, but did work in the old one. Then I read that Merlin now uses inadyn for custom DDNS scripts. Tried too but didn't work either, dns entry were never updated in the changeip.com panel.
Digging into it I've just discovered that the problem seems to be the wget/curl call, the host nic.changeip.com doesn't respond either through HTTP or HTTPS. The funny thing is if I put the url in my browser it does work and updates the DDNS entry, but from the router itself it doesn't. Both PC and router uses same Cloudflare DNS (1.1.1.1 and 1.0.0.1). I can't see anything in the router's log that indicates something blocks this connections (all HTTP filtering is disabled).

I even tried changing wget user agent to the one my computer has and still no response.

Neither a telnet works from the router:
Code:
root@RT-AX58U:/tmp/home/root# telnet nic.changeip.com:80
telnet: can't connect to remote host (170.178.190.165): Connection timed out

Code:
root@RT-AX58U:/tmp/home/root# telnet nic.changeip.com:443
telnet: can't connect to remote host (170.178.190.165): Connection timed out

Code:
root@RT-AX58U:/tmp/home/root# telnet www.microsoft.com:80
c

HTTP/1.0 400 Bad Request
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 216
Expires: Thu, 11 Jun 2020 21:36:09 GMT
Date: Thu, 11 Jun 2020 21:36:09 GMT
Connection: close

<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reference&#32;&#35;7&#46;87271102&#46;1591911369&#46;0
</BODY>
</HTML>
Connection closed by foreign host

And yes, tried rebooting the router. I can't figure how changeip.com may be blocking this, I guess the problem is in my router.

Changing ddns provider is not an option, too many places to change things in.

Any help would be appreciated.

Thanks
 
Last edited:
Here are the steps I use to get it working. You will need to do a specific setup for changeip.com

On router…

Enable ssh and custom scripts on jffs

ssh into router and...

1. Create file /jffs/inadyn.conf with following content:

touch /jffs/inadyn.conf
nano /jffs/inadyn.conf

provider duckdns.org {

username = xxxxxxxx [this is actually the token for duckdns]

password = ""

hostname = xxxxx.duckdns.org

}


2. Check the file is valid:

inadyn --check-config -f "/jffs/inadyn.conf"


3. Create file /jffs/scripts/ddns-start with following content

touch /jffs/scripts/ddns-start
nano /jffs/scripts/ddns-start

#!/bin/sh

inadyn --once -f "/jffs/inadyn.conf" -e "/sbin/ddns_custom_updated 1" --continue-on-error "/sbin/ddns_custom_updated 1"


4. Give the ddns-start execute permissions:

chmod +x /jffs/scripts/ddns-start
 
Thanks for the response.

Yes, I already tried that exact provider yesterday (just landed on it scrolling through the wiki page) and it works. After all those steps you need to manually run the script once in order to make it work.

The problem is changeip won't work even through inadyn, already tried. It's a network problem and I can't figure out where it is.
 
Apologies - I didn't realise your issue is with the changeip.com api.

I think your first post confirms that the api does work fine on other pc's that connect through the Asus router. Is this correct?

It is a strange issue and maybe you need to do a clean/new install on the router to see if that resolves it...
 

Latest threads

Sign Up For SNBForums Daily Digest

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