How to set wget-ssl for ddns?

I have two routers,one is a brand-- G-DOCK v2 on which producer build openwrt , another is customized on my old pc with openwrt.
The ddns service on G-DOCK v2 is in good status, ddns service on my own customized openwrt can't work.
I have set the same ddns config file according to G-DOCK v2's.

cat /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_network 'wan'
	option service_name ''
	option lookup_host ''
	option domain ''
	option username ''
	option password 'yyyy'
	option ip_source 'web'
	option ip_url 'http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]'
	option force_unit 'minutes'
	option check_interval '5'
	option force_interval '5'
	option bind_network 'lan'
	option use_https '1'
	option cacert '/etc/ssl/certs'
	option enabled '1'

Log file on my customized openwrt:

 051911  info : Starting main loop at 2021-06-04 05:19
 051911       : Detect local IP on 'web'
 051911       : Force communication via device 'br-lan'
 051911       : #> /usr/bin/curl -RsS -o /var/run/ddns/myddns_ipv4.dat --stderr /var/run/ddns/myddns_ipv4.err --interface br-lan --noproxy '*' 'http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]'
 051914 ERROR : cURL Error: '7'
 051914       : curl: (7) Failed to connect to port 80: Host is unreachable
 051914  WARN : Transfer failed - retry 1/0 in 60 seconds

Log file on G-DOCK v2:

 132511       : Detect local IP on 'network'
 132512       : Local IP 'xx.xx.xx.xx' detected on network 'wan'
 132512       : Update needed - L: 'xx.xx.xx.xx' <> R: 'yy.yy.yy.yy'
 132513       : #> /usr/bin/wget-ssl -nv -t 1 -O /var/run/ddns/myddns_ipv4.dat -o /var/run/ddns/myddns_ipv4.err --no-proxy '***PW***'
 132517       : DDNS Provider answered:
good xx.xx.xx.xx
 132517  info : Update successful - IP 'xx.xx.xx.xx' send
 132518  info : Forced update successful - IP: 'xx.xx.xx.xx' send
 132518       : Waiting 300 seconds (Check Interval)

1.How can set /usr/bin/wget-ssl work for my customized openwrt?
2.Why username and password can't pass into the url for my customized openwrt?

did you read the error message it's displaying ?

have you configured DNSes, and a default gateway ?

1 Like

/usr/bin/curl -RsS -o /var/run/ddns/myddns_ipv4.dat --stderr /var/run/ddns/myddns_ipv4.err --interface br-lan --noproxy '*' 'http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]'

I have set username and password,why it don't pack the arguments into url ?

try running it from a prompt first, see if it works that way, with all values filled in, of course.

curl http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]

1 Like

If ip address changed

curl http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]
good 113.xx.xx.xx

If unchanged

curl http://[USERNAME]:[PASSWORD][DOMAIN]&myip=[IP]
nochg 113.xx.xx.xx

From the nmap output:

root@OpenWrt:~# nmap -p 80
Starting Nmap 7.70 ( ) at 2021-06-04 13:42 UTC
Nmap scan report for (
Host is up (0.30s latency).

80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 9.10 seconds

I am sure that the key issue is why username and password can't pack into url ?

I don't have access to an openwrt device at the moment.

but you could try hardcoding the username and pwd into the URL, instead of relying on variables from the luci config page.

modify the ddns script, making the curl string is echoed out to a file, so you can see the actual
command being executed.

 ls  /usr/lib/ddns

Which file to modify then?

don't know, which one contains the curl call ?