if I remove dns-server=$changeipsvr zone="nic.changeip.com" I get missing parameters error when I enter these values I get script error: connection timeout
the original script works fine on os version 6.4 with out using dns-server=$changeipsvr zone="nic.changeip.com" but in version 7.1 without these values the script fails
I also added a static DNS entry for nic.changeip.com which is 170.178.190.178 at this point I think I have dns-server value wrong or zone wrong any help would be appreciated
Here is my script im using
Code: Select all
:global ddnsuser "username"
:global ddnspass "password"
:global ddnshost "mydomain.changeip.com"
:global ddnsinterface "lte1"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:global ddnssystem ("mt-" . [/system package get [/system package find name=routeros] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip
:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }
:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }
:if ([ :typeof $ddnsip ] = "nothing" ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:global changeipsvr [:put [:resolve nic.changeip.com]]
:log info $"changeipsvr"
# PROBLEM is here times out #
:log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass dns-server=$changeipsvr zone="nic.changeip.com" ] ]
:log info ("DDNS Updated")
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No changes necessary."
}
}