DDNS with OpenWRT question about update interval

Hello everybody,
I'm experiencing OpenWRT's DDNS package for the first time and have a question :slight_smile:

So far I have done DDNS via the integrated solution from my Synology NAS. I would like to switch and move the service to the router, I think that makes more sense or?

My question now is about the update interval. My IP address changes very rarely. For weeks I have the same. I think my DDNS provider doesn't like it when I send an IP update without the IP changing. My providers are nsupdate.info and ddnss.de.
The Synology service actually only ever sent an update when the IP changed. With the OpenWRT package it is different. With my current settings it sends an update every 72 minutes. Can this also be set so that only an update is sent when the IP has actually changed?

For completeness, here is my configuration.......

config service 'NAME'
	option service_name 'ddnss.de'
	option use_ipv6 '0'
	option enabled '1'
	option username 'USERNAME'
	option password 'PASSWORD'
	option ip_source 'web'
	option ip_url 'http://ddnss.de/meineip.php'
	option use_syslog '2'
	option check_unit 'minutes'
	option force_unit 'minutes'
	option retry_unit 'seconds'
	option interface 'br-lan.11'
	option lookup_host 'URL'
	option domain 'URL'
	option use_https '1'
	option cacert '/etc/ssl/certs'

and

config service 'NAME'
	option service_name 'nsupdate.info'
	option use_ipv6 '0'
	option enabled '1'
	option lookup_host 'URL'
	option domain 'URL'
	option username 'USERNAME'
	option password 'PASSWORD'
	option use_syslog '2'
	option check_unit 'minutes'
	option force_unit 'minutes'
	option retry_unit 'seconds'
	option ip_source 'web'
	option interface 'br-lan.11'
	option ip_url 'http://ddnss.de/meineip.php'
	option use_https '1'
	option cacert '/etc/ssl/certs'

You can set force_interval to something more reasonable. For example:

config service 'NAME'
    ....
    option force_interval '7'
    option force_unit 'days'
    option check_interval '15'
    option check_unit 'minutes'

DDNS scripts will check for changed IP on the chosen interface every 15 minutes. If it has changed, update the DNS record. However, also update the DNS record every 7 days, even if it hasn't changed in 7 days.


By the way, I see you have option interface 'br-lan.11', did you actually mean to use this instead?

    option ip_source 'network'
    option ip_network 'wan'
    option interface 'wan'

So that DDNS gets updated with the public IP address of the WAN interface and not the private IP addresses of LAN?

2 Likes

Thank you for your feedback!
Ok that means that DDNS scripts will send the IP update immediately after an IP change at the latest after 15 minutes right?
After 7 days and in any case it will sends an update, which is ok I think.

Because of my settings. This has worked so but actually makes no sense I think.... I have now changed it as you write in:

config service 'NAME'
	option service_name 'ddnss.de'
	option use_ipv6 '0'
	option enabled '1'
	option lookup_host 'URL'
	option domain 'URL'
	option username 'USERNAME'
	option password 'PASSWORD'
	option use_syslog '2'
	option check_unit 'minutes'
	option force_unit 'minutes'
	option retry_unit 'seconds'
	option use_https '1'
	option cacert '/etc/ssl/certs'
	option ip_source 'network'
	option ip_network 'wan'
	option interface 'wan'


Now I have not included IP info page, that's ok?
I think so it should fit my settings then and I migrate my addresses from the NAS to OpenWrt :slight_smile:

I still wonder about one think....
I didn't install the ca-certificates package as described here https://openwrt.org/docs/guide-user/services/ddns/client. Nevertheless it seems to work with SSL. On the page of my provider it says that the update was sent with TLS..... can this be right or do I have another error here? Unfortunately I don't know anything about certificates either.

EDIT:
And another problem :slight_smile: When I do a reload in Luci on the DDNS page I get a message "XHR request timed out" is this related to the DDNS package?

If you're talking about ip_url, it's not needed if ip_source is set to "network". This is what you want if your WAN interface has a public IP address that is not a CGNAT address (any address in the range 100.64.0.0 to 100.127.255.255).

Check if ca-bundle is installed using opkg list-installed | grep ca-bundle. I think that's the newer package that will provide the CA certificates needed for TLS to work. Some other packages depend on ca-bundle (e.g. curl), so you may have installed it indirectly from some other package.

No, it has nothing to do with DDNS. "XHR" stands for "XMLHttpRequest" and it is what LuCI uses to communicate with your device to populate the web page. It's a harmless error since you're reloading LuCI, although the message wording could use some work.

2 Likes

Instructions to separately install ca-certificates are outdated. For the past few years, the package and upgrade servers have required SSL, so SSL support including certificates is included in release builds.

1 Like

Thank you so much, you are right, it is installed ca-bundle :slight_smile: Thanks for the information about ip_source and XHR message :+1:

EDIT:
I now have two of addresses that update every few hours even though 7 days is set and the IP address has not changed. Maybe I delete these two entries again and create them new.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.