With the free DonDNS script, you'll have your router accessible from everywhere, even if your ISP changes your IP address on every connection.
Use one of your domains as a CNAME to access your router from the Internet. You won't need to remember your IP address anymore.
You can install the script with the web interface of the RouterOS or using the winbox. To do so:
##############Script Settings##################
:local DONDNSUser NOMBRE_DE_API_AQUI
:local DONDNSPass CONTRASEÑA_DE_API_AQUI
:local DONDNSDomain micasa.midominio.com.foo.bar
:local WANInter pppoe-out1
###############################################
:local IpCurrent [/ip address get [find interface=$WANInter] address]
:for i from=( [:len $IpCurrent] - 1) to=0 do={
:if ( [:pick $IpCurrent $i] = /) do={
:local NewIP [:pick $IpCurrent 0 $i];
:if ([:resolve $DONDNSDomain] != $NewIP) do={
/tool fetch mode=http url=http://dondns.dondominio.com/plain/?user=$DONDNSUser&password=$DONDNSPass&host=$DONDNSDomain&ip=$NewIP keep-result=no
:log info DonDNS Update: $DONDNSDomain - $NewIP
}
}
}
To install the DNS updater on you router MikroTik with RouterOS you'll have to execute the following script in the router terminal:
/system script
add name=DonDNS source="##############Script Settings##################\r\
\n\r\
\n:local DONDNSUser \"NOMBRE_DE_API_AQUI\"\r\
\n:local DONDNSPass \"CONTRASEÑA_DE_API_AQUI\"\r\
\n:local DONDNSDomain \"micasa.midominio.com.foo.bar\"\r\
\n:local WANInter \"pppoe-out1\"\r\
\n\r\
\n###############################################\r\
\n\r\
\n:local IpCurrent [/ip address get [find interface=$WANInter] address];\r\
\n:for i from=( [:len $IpCurrent] - 1) to=0 do={\r\
\n :if ( [:pick $IpCurrent $i] = \"/\") do={\r\
\n :local NewIP [:pick $IpCurrent 0 $i];\r\
\n :if ([:resolve $DONDNSDomain] != $NewIP) do={\r\
\n /tool fetch mode=http url=\"http://dondns.dondominio.com/plain/Fuser=$DONDNSUser&password=$DONDNSPass&host=$DONDNSDomain&ip=$NewIP\" keep-result=no\r\
\n :log info \"DonDNS Update: $DONDNSDomain - $NewIP\"\r\
\n }\r\
\n }\r\
\n}\r\
\n\r\
\n"
/system scheduler
add interval=5m name="DonDNS scheduler" on-event=DonDNS start-date=jan/02/1970 start-time=01:00:40