I've taken scripts from this forum to update ddns. I've checked that the ddns url works from a browser in the following format
https://dynamicdns.park-your-domain.com ... p=[your_ip]
:
Code: Select all
local password "thesecretkey1234"
:local subdomain "@"
:local domainn "mydomain.com"
:log info "Start DDNS $subdomain $domainn"
:local currentIP [/ip address get [:pick [/ip address find interface="SSEbb"] 0] address]
:log info "WAN IP:$currentIP"
:local url1 "https://dynamicdns.park-your-domain.com/update\3Fhost=$subdomain&domain=$domainn&password=$password&ip=$currentIP"
/tool fetch url=($url1) mode=https
:log info "DNS Successfully Updated"
From the terminal I've executed the get ip address and it does return the correct address/interface.
Aside from the above, if I execute the below line from terminal and then log/put the var it returns a blank string.
Code: Select all
:local currentIP [/ip address get [:pick [/ip address find interface="SSEbb"] 0] address]