[SOLVED] DDNS detects reply falsely

I'm using LEDE Reboot 17.01.4 on a WRT1900ACSv2 router. I have DDNS setup using easydns. Everything works fine to a point: the correct address is detected, it is sent to easydns, they get it and reply it is ok, but hasn't changed so no need to update, and then DDNS says it failed, so it keeps trying.

This is the output from the log:

 192743       : ************ ************** ************** **************
 192743  note : PID '10653' started at 2018-04-11 19:27
 192743       : ddns version  : 2.7.6-13
 192743       : uci configuration:
ddns.myddns_ipv4.check_interval='30'
ddns.myddns_ipv4.domain='xxxxxxx.ca'
ddns.myddns_ipv4.enabled='1'
ddns.myddns_ipv4.interface='wan'
ddns.myddns_ipv4.ip_network='wan'
ddns.myddns_ipv4.ip_source='network'
ddns.myddns_ipv4.lookup_host='xxxxxx.ca'
ddns.myddns_ipv4.password='xxxxxxxx'
ddns.myddns_ipv4.service_name='easydns.com'
ddns.myddns_ipv4.use_https='1'
ddns.myddns_ipv4.username='doscott'
ddns.myddns_ipv4=service
 192743       : verbose mode  : 0 - run normal, NO console output
 192743       : check interval: 1800 seconds
 192743       : force interval: 259200 seconds
 192743       : retry interval: 60 seconds
 192743       : retry counter : 0 times
 192743       : No old process
 192743       : last update: never
 192743       : Detect registered/public IP
 192743       : #> /usr/bin/nslookup xxxxxx.ca  >/var/run/ddns/myddns_ipv4.dat 2>/var/run/ddns/myddns_ipv4.err
 192744       : Registered IP 'xxx.xxx.xxx.xxx' detected
 192744  info : Starting main loop at 2018-04-11 19:27
 192744       : Detect local IP on 'network'
 192744       : Local IP 'xxx.xxx.xxx.xxx' detected on network 'wan'
 192744       : Forced Update - L: 'xxx.xxx.xxx.xxx' == R: 'xxx.xxx.xxx.xxx'
 192744       : #> /usr/bin/wget-ssl -nv -t 1 -O /var/run/ddns/myddns_ipv4.dat -o /var/run/ddns/myddns_ipv4.err --no-proxy 'https://xxxxxx:xxxxxxx@api.cp.easydns.com/dyn/generic.php?hostname=xxxxxxx.ca&myip=xxx.xxx.xxx.xxx'
 192745       : DDNS Provider answered:
    <HTML><BODY><FONT FACE="sans-serif" SIZE="-1">OK<br />
    <hr noshade size="1">
    no update required for xxxxxx.ca to xxx.xxx.xxx.xxx<br />
    </FONT></BODY></HTML>
192745 ERROR : IP update not accepted by DDNS Provider
192745       : Waiting 1800 seconds (Check Interval)

It is ignoring the 'OK', treating the 'no update' as a failure and then the next time it runs it sees that the IP was not set before and tries to do it again. The good news is it will set the IP if it changes, but it shouldn't be making the attempts when there is no change.

This is my /etc/config/ddns

config ddns 'global'
	option ddns_dateformat '%F %R'
	option ddns_loglines '250'
	option upd_privateip '0'

config service 'myddns_ipv4'
	option interface 'wan'
	option ip_source 'network'
	option ip_network 'wan'
	option service_name 'easydns.com'
	option lookup_host 'xxxxxx.ca'
	option domain 'xxxxxx.ca'
	option username 'xxxxx'
	option password 'xxxxxxx'
	option enabled '1'
	option check_interval '30'
	option use_https '1'

I've search the forum and the git repo, and I can find anything like this. I don't know if this is a bug or I am doing something wrong?

...Are you sure??? How do you surmise it knows your IP changes?

If I understand your problem...I think the software is working as designed. The provider isn't required to accept the unchanged IP.

The field
last update: never
should updated as even though the provider didn't change the IP, it said "OK".

The ddns script is trying to update the IP every 30 minutes, even though it hasn't changed, because the last update is still 'never'. It shouldn't be trying again until the force_interval setting is reached (which is not in the config file since I went with the default).

I found the solution. Edit the /etc/ddns/services file, find the line with easydns.com in it, and change the "NOERROR" at the end of the line to "OK|NOERROR".

I submitted a bug report followed by a pull request after I figured this out.

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