Community discussions

 
cicserver
Member
Member
Topic Author
Posts: 300
Joined: Sun Jul 24, 2011 12:04 pm

changeip.com script for ver 6.24

Fri Jan 02, 2015 1:26 pm

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?
 
eternal0
newbie
Posts: 49
Joined: Fri Jun 20, 2014 5:56 pm

Re: changeip.com script for ver 6.24

Sun Jan 04, 2015 1:44 pm

I think old script works well in 6.24.
: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" }
}
 
cicserver
Member
Member
Topic Author
Posts: 300
Joined: Sun Jul 24, 2011 12:04 pm

Re: changeip.com script for ver 6.24

Mon Jan 05, 2015 7:17 am

@eternal0
After running this script, I am getting error "invalid internal item number"
 
cicserver
Member
Member
Topic Author
Posts: 300
Joined: Sun Jul 24, 2011 12:04 pm

Re: changeip.com script for ver 6.24

Mon Jan 05, 2015 7:51 am

Finally got it working with following:
: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" }
}
 
gat0
just joined
Posts: 15
Joined: Thu Jan 26, 2017 4:37 am
Location: Argentina

Re: changeip.com script for ver 6.24

Wed Jul 19, 2017 4:06 am

Finally got it working with following:
: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!

Regards

Who is online

Users browsing this forum: No registered users and 93 guests