I recently upgraded mikrotik from 5.20 to 6.24 , now the ddns script for changeip.com is not working.
can one please post the updated changeip.com script for ver 6.xx?
:local ddnsuser "username@changeip"
:local ddnspass "password@changeip"
:local ddnshost "domain@changeip"
:local ddnsinterface "interface_name"
:global ddnslastip
:local ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip 0.0.0.0/0 }
:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.") } else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip } else={
:log info "DDNS: No change" }
}
:local ddnsuser "CHANGEIP_USERNAME"
:local ddnspass "CHANGEIP_PASSWORD"
:local ddnshost "CHANGEIP_YOUR_DOMAIN_NAME"
:local ddnsinterface "WAN_INTERFACE"
:global ddnslastip
:global ddnsip [ /ip address get [find interface=$ddnsinterface disabled=no] address ]
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip 0.0.0.0/0 }
:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.") } else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip } else={
:log info "DDNS: No change" }
}
Thanks! this work for me!Finally got it working with following:Code: Select all:local ddnsuser "CHANGEIP_USERNAME" :local ddnspass "CHANGEIP_PASSWORD" :local ddnshost "CHANGEIP_YOUR_DOMAIN_NAME" :local ddnsinterface "WAN_INTERFACE" :global ddnslastip :global ddnsip [ /ip address get [find interface=$ddnsinterface disabled=no] address ] :if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip 0.0.0.0/0 } :if ([ :typeof $ddnsip ] = nil ) do={ :log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.") } else={ :if ($ddnsip != $ddnslastip) do={ :log info "DDNS: Sending UPDATE!" :log info [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] :global ddnslastip $ddnsip } else={ :log info "DDNS: No change" } }