I've this script running:
# Set needed variables
:local username "xxxx"
:local password "yyyy"
:local hostname "zzzz.noip.me"
:global dyndnsForce
:global previousIP
# print some debug info
#:log info ("pppoe2 - dyndns-update: username = $username")
#:log info ("pppoe2 - dyndns-update: password = $password")
#:log info ("pppoe2 - dyndns-update: hostname = $hostname")
#:log info ("pppoe2 - dyndns-update: previousIP = $previousIP")
#get ip address from interface
#:global ddnsip [/ip address get [/ip address find interface=pppoe-out2] address]
#:global ip [ :pick $ddnsip 0 [ :find $ddnsip "/" ] ]
#:log info $ip
# 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"
#:local result [/file get dyndns.checkip.html contents]
:global ddnsip [/ip address get [/ip address find interface=pppoe-out2] address]
:global currentIP [ :pick $ddnsip 0 [ :find $ddnsip "/" ] ]
#:log info $currentIP
# 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 "dyndns-update: currentIP = $currentIP"
# Determine if dyndns update is needed
# more dyndns updater request details available at
http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
/tool fetch user=$username password=$password mode=http address="dynupdate.no-ip.com" src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/dyndns.txt"
:local result [/file get dyndns.txt contents]
:log info ("pppoe2 - dyndns-update: Dyndns update needed")
:log info ("pppoe2 - dyndns-update: Dyndns Update Result: ".$result)
:put ("Dyndns Update Result: ".$result)
} else={
:log info ("pppoe2 - dyndns-update: No dyndns update needed")
}