NOC WIKI MIKROTIK MIKROTIK NOIP UPDATE SCRIPT

MIKROTIK NOIP UPDATE SCRIPT

##############Script Settings##################

:local NOIPUser "username"

:local NOIPPass "password"

:local WANInter "ether1"

###############################################

:local NOIPDomain "noiphostmane"

###############################################

:local IpCurrent [:resolve myip.opendns.com server=208.67.222.222];

:put $IpCurrent

:if ([:resolve $NOIPDomain] != $IpCurrent) do={

      /tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$Ipcurrent" keep-result=no

      :log info "NO-IP Update: $NOIPDomain - $IpCurrent"

}

:local IpCurrent [:resolve myip.opendns.com server=208.67.222.222];

:put $IpCurrent

:if ([:resolve $NOIPDomain] != $IpCurrent) do={

      /tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$Ipcurrent" keep-result=no

      :log info "NO-IP Update: $NOIPDomain - $IpCurrent"

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post