What's new

In-A-Dyn and cPanel 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!

eZwa

Occasional Visitor
Hello;

I've been trying to find a way to configure In-A-Dyn to have it call back and update a DDNS subdomain hosted on a cPanel instance that I have running on a remote server, but have so far been unsuccessful.

cPanel's DDNS feature uses a webcall string to grab the IP address of the host when the URL is accessed, and doesn't need parameters such as username, password, and WAN IP address to be handed off as part of the update process.

Example of the webcall URL: https://FQDN.TLD/cpanelwebcall/<UNIQUE 32 ALPHA CHARACTER STRING>

As a workaround, I've been manually executing the webcall via my browser to update the IP address for the DDNS subdomain, but would prefer to hand this off to my router as a scheduled process.

Any guidance on how to make this happen would be greatly appreciated.

Cheers :)

---------------------

Model: RT-AX68U
Current Router F/W: 386.4_0
 
Are you trying to update your own server in *addition* to a commercial DDNS provider? Or just update your own server? Because if it's the latter, then presumably you could create your own ddns-start script and use curl to do the update.
 
Are you trying to update your own server in *addition* to a commercial DDNS provider? Or just update your own server? Because if it's the latter, then presumably you could create your own ddns-start script and use curl to do the update.
Just my own server, no additional DDNS providers at play.

Would a script like this work to process the CURL request?

Code:
#!/bin/sh

curl -fs -o /dev/null "https://FQDN.TLD/cpanelwebcall/<UNIQUE 32 ALPHA CHARACTER STRING>"

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

I took the script for "ChangeIP" from the wiki, and removed the "Username/Password/Hostname" parameters. I have yet to load the script onto the router to try, but was planning to this evening once I got home.
 
Are you trying to update your own server in *addition* to a commercial DDNS provider? Or just update your own server? Because if it's the latter, then presumably you could create your own ddns-start script and use curl to do the update.

My apologies for the delayed update, finally getting a chance to give this a go.

I've created the ddns-start script, but it's failing to update as shown in this log snippet:

Code:
Feb 12 11:05:08 watchdog: start ddns.
Feb 12 11:05:08 rc_service: watchdog 789:notify_rc start_ddns watchdog
Feb 12 11:05:08 start_ddns: update CUSTOM , wan_unit 0
Feb 12 11:05:08 start_ddns: Clear ddns cache.
Feb 12 11:05:08 custom_script: Running /jffs/scripts/ddns-start (args: xxx.xxx.xxx.xxx) **
Feb 12 11:05:08 ddns: Custom ddns update failed

** IP address has been masked

I'm thinking the repurposed ChangeIP script will need to be adjusted, but not sure where to start with this process.
 

Similar threads

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