OpenWrt Forum Archive

Topic: Improve the DuckDNS DDNS section of the Wiki

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I run the service https://www.duckdns.org

I really want to improve the instructions on our site (https://www.duckdns.org/install.jsp?tab=openwrt)

However I don't have an OpenWrt system to check/work with the instructions.

The current instructions on your Wiki seem to have been improved recently (http://wiki.openwrt.org/doc/howto/ddns. … uckdns.org)

However we have fixed a few of the issues and I would like to update the Wiki and our site to reflect the updates.


Firstly we have now swapped SSL Certificate providers - so it should be that we don't need to add -k to the retrieve program

Also the configuration seems to use the WEB to test the IP, is this normal wont the WAN Address be a more efficient way to do this?
Also we don't need the IP passing to us (At duckdns /update) we pull the IP out of the request.


So with all that in mind - is this the correct config procedure now?
note: I have not changed the IP param of the update from web

Can someone test it?

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

Add Duck DNS to ''services''
The reason you want to add Duck DNS to the services file is because this will allow you to configure other ddns services if needed, and it allows for proper https usage with curl.
Edit /usr/lib/ddns/services and add this to the end of the file:

# Duck DNS
"duckdns.org"          "https://www.duckdns.org/update?domains=[DOMAIN]&token=[PASSWORD]&ip=[IP]"

Duck DNS ddns-scripts ''config'' example

    config service "myddns"
        option enabled          "1"
        option interface        "wan"
        option service_name     "duckdns.org"
        option domain           "DOMAIN"
        option username         "LEAVE BLANK"
        option password         "xxxxxxx-YOUR_TOKEN-xxxx-xxxxxxxxxxxx"
        option force_interval   "12"
        option force_unit       "hours"
        option check_interval   "10"
        option check_unit       "minutes"
        option ip_source        "web"
        option ip_url           "http://wtfismyip.com/text"
       option use_https        "1"
       option cacert           "/etc/ssl/certs/cacert.pem"

(Last edited by StevenHarperUK on 6 Oct 2013, 12:09)

This guide is great.  One question - how am I able to tell if it is working correctly?  LOGREAD says 'update successful' 

Should the 'last changed' field on the duckdns site be update periodically even if the ip doesn't change?  Just looking for a way to confirm that the site is receiving my updates.

Thanks for a great service

I setup duckdns in my ddns config today.  Just added the entry in /usr/lib/ddns/services and then refreshed Luci and used UI to add the remaining parameters.  Then I added the option use_https "1" to config.

No idea if it is working or not working.  Something on the duckdns web control panel that says time of last update would be helpful to know if it is configured correctly before the first time the IP really changes.

Thanks for the free ddns service!

Sorry but can someone help me to understand a few things here. I managed to install openwrt and luci a few weeks back and I have just installed the dyndns services into openwrt.

I need a walkthrough. My first question is how do I Edit /usr/lib/ddns/services  ???

I've tried changing directories in putty but I'm getting nowhere and obviously going about it in the wrong way. I cant reach the openwrt links here or in Google which isn't helping. Many thanks for any help.

      can't cd to /usr/lib/ddns/services  ??????

(Last edited by colsearle on 1 May 2014, 13:40)

colsearle wrote:

Sorry but can someone help me to understand a few things here. I managed to install openwrt and luci a few weeks back and I have just installed the dyndns services into openwrt.

I need a walkthrough. My first question is how do I Edit /usr/lib/ddns/services  ???

I've tried changing directories in putty but I'm getting nowhere and obviously going about it in the wrong way. I cant reach the openwrt links here or in Google which isn't helping. Many thanks for any help.

      can't cd to /usr/lib/ddns/services  ??????

It is actually a file, not a directory. You should use "vi" to open the file. Since the instructions asks you to add/append two lines to the file, you can use

echo "what-ever-you-want-to-append-goes-here" >> /usr/lib/ddns/services

OK, I just created a subdomain (malahal.duckdns.org). The duckdns install guide suggests "malahal" as domain in /etc/config/dns file. Looks like this domain is used by /usr/lib/ddns/dynamic_dns_updater.sh script to do TWO things:

1. Used in constructing the update URL. This gives right url
2. Also used in checking the registered IP address by running nslookup. In my case, the script runs "nslookup malahal". This is incorrect. It should run "nslookup malahal.duckdns.org". So the script never finds my registered IP address! This results in ip address getting updated with duckdns for every 10 minutes. Ideally it should update every 72 hours only.

Any comments from openwrt users or duckdns admins???

I am new to openwrt but no stranger to Linux.

The discussion might have continued from here.