OpenWrt Forum Archive

Topic: ddns & nsupdate

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

I need to setup dynamic ddns on the latest openwrt trunk version.
On previous versions I used customized dynamic_dns_updater.sh, but in the modern versions functionality seem to be builtin.
/usr/lib/ddns/update_nsupdate.sh script seems correct one.
But there's bug in luci so I cannot save any ddns entry.
I have to create /etc/config/ddns myself.

Can you pls give me an example of correct ddns configuration for nsupdate ?

I have keyfile that looks like :

key "some.domain.com" {
        algorithm hmac-sha256;
        secret "..........................E=";
};

(Last edited by bolvan on 9 Jan 2016, 14:23)

Hi,
I'm very sorry but I never got feedback on "nsupdate" script. So I can't test.
Do you have your old customized script ? If yes could you please mail me directly so I can have a look on it.
Thanks
Christian

chris5560 wrote:

Hi,
I'm very sorry but I never got feedback on "nsupdate" script. So I can't test.
Do you have your old customized script ? If yes could you please mail me directly so I can have a look on it.
Thanks
Christian

Finally I've discovered how to use builtin script.

/etc/config/ddns :

config service 'testupdate_dyn_domain_com'
    option domain 'testupdate.dyn.domain.com'
    option dns_server 'ns1.domain.com'
    option ip_source 'network'
    option interface 'wan'
    option ip_network 'wan'
    option use_syslog '2'
    option use_logfile '1'
    option enabled '1'
    option update_script '/usr/lib/ddns/update_nsupdate.sh'
    option username 'hmac-sha256:testupdate.dyn.domain.com'
    option password '...................fB0='
    option check_interval '1'
    option check_unit 'hours'

keyfile :

key "testupdate.dyn.domain.com" {
        algorithm hmac-sha256;
        secret "...................fB0=";
};

To test run  '/usr/lib/ddns/dynamic_dns_updater.sh testupdate_dyn_domain_com'

Make sure the following packages are installed : bind-libs bind-client bind-tools
On the server side I run bind9 with specially configured zones with dynamic updates enabled.

(Last edited by bolvan on 10 Jan 2016, 14:04)

This thread is quite old but it is still accurate

On LEDE 17.01.4
I had hard time understanding the username option

The username must be set to the key name known by bind as in

key "BindKeyName" {
        algorithm hmac-md5;
        secret "QJc08cnP1xkoF4a/eSZZbw==";
};

the first part is optionnal if the algorithm is the default for nsupdate so the option in /etc/config/ddns should look like

option username [alg]:BindKeyName

(Last edited by guym on 10 Nov 2017, 14:03)

The discussion might have continued from here.