DynDNS update script not working after update to 6.30 - can someone check this one?

Hi

So I have been using this code for over a year without a problem:

# Set needed variables
:local username "XXXXXX"
:local password "XXXXXX"
:local hostname "XXXXXX.dyndns.org"

:global dyndnsForce ""
:global previousIP "$previousIP"

# print some debug info
:log info ("UpdateDynDNS: username = $username")
:log info ("UpdateDynDNS: hostname = $hostname")
:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:delay 1
:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [:pick $result $startLoc $endLoc]
:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html

:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
:log info "$currentIP or $previousIP"
/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
dst-path="/dyndns.txt"
:delay 1
:local result [/file get dyndns.txt contents]
:log info ("UpdateDynDNS: Dyndns update needed")
:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
:put ("Dyndns Update Result: ".$result)
} else={
:log info ("UpdateDynDNS: No dyndns update needed")
}

I have two 2011UiAS-2HnD.

One has 6.29 and script works fine, second has 6.30 and script is not updating DynDNS with new IP.

Can someone check above script with 6.30 or modify it to work with 6.30?

Hi,

Look at this: http://forum.mikrotik.com/t/6-30-rc-final-fixes-before-release/89112/1

Regards!

Hi
I’m running script this on on my RB2011UiAS on 6.30 with out any problems.

#Dynamic DNS Update Script for No-IP DNS behind nat
# Set needed variables
:local username "**********@gmail.com"
:local password "******"
:local host "********.ddns.net"
:global previousIP
# print some debug info
# :log info ("Update No-IP DNS: username = $username")
# :log info ("Update No-IP DNS: hostname = $host")
# :log info ("Update No-IP DNS: previousIP = $previousIP")
#
# behind nat - get the public address using dyndns url http://checkip.dyndns.org
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:delay 2
:local result [/file get dyndns.checkip.html contents]
:log info "dyndns result = $result"
# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [pick $result $startLoc $endLoc]
:log info "No-IP DNS: currentIP = $currentIP"
:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP $currentIP is not equal to previous IP, update needed"
:set previousIP $currentIP
:local url "http://dynupdate.no-ip.com/nic/update/?myip=$currentIP&hostname=$host"
:log info "No-IP DNS: Sending update for $host"
/tool fetch url=$url user=$username password=$password mode=http dst-path=("no-ip_ddns_update.txt")
:log info "No-IP DNS: Host $host updated on No-IP with IP $currentIP"
:delay 2
:local result [/file get "no-ip_ddns_update.txt" contents]
:log info "Update Result = $result"
} else={
:log info "No-IP: update not needed "
}
# end

Regards

[quote=“Bigfoot”]Hi
I’m running script this on on my RB2011UiAS on 6.30 with out any problems.

Thanks Bigfoot!
after looking in many scripts, yours seems to work for me
2011UiAS-2HnD running v. 6.34.3