Configurando um ddns para o mikrotik no site no ip

Configurando um ddns para o mikrotik no site no ip

==============SCRPT==============================

# No-IP automatic Dynamic DNS update

#————— Change Values in this section to match your setup ——————

# No-IP User account info
:local noipuser “E-MAILDONOIP”
:local noippass “SUA_SENHA”

# Set the hostname or label of network to be updated.
# Hostnames with spaces are unsupported. Replace the value in the quotations below with your host names.
# To specify multiple hosts, separate them with commas.
:local noiphost “URLDINAMICA”

# Change to the name of interface that gets the dynamic IP address
:local inetinterface “INTERFACE”

#————————————————————————————
# No more changes need

:global previousIP

:if ([/interface get $inetinterface value-name=running]) do={
# Get the current IP on the interface
   :local currentIP [/ip address get [find interface=”$inetinterface” disabled=no] address]

# Strip the net mask off the IP address
   :for i from=( [:len $currentIP] – 1) to=0 do={
       :if ( [:pick $currentIP $i] = “/”) do={
           :set currentIP [:pick $currentIP 0 $i]
       }
   }

   :if ($currentIP != $previousIP) do={
       :log info “No-IP: Current IP $currentIP is not equal to previous IP, update needed”
       :set previousIP $currentIP

# The update URL. Note the “3F” is hex for question mark (?). Required since ? is a special character in commands.
       :local url “http://dynupdate.no-ip.com/nic/update3Fmyip=$currentIP”
       :local noiphostarray
       :set noiphostarray [:toarray $noiphost]
       :foreach host in=$noiphostarray do={
           :log info “No-IP: Sending update for $host”
           /tool fetch url=($url . “&hostname=$host”) user=$noipuser password=$noippass mode=http dst-path=(“no-ip_ddns_update-” . $host . “.txt”)
           :log info “No-IP: Host $host updated on No-IP with IP $currentIP”
       }
   }  else={
       :log info “No-IP: Previous IP $previousIP is equal to current IP, no update needed”
   }
} else={
   :log info “No-IP: $inetinterface is not currently running, so therefore will not update.”
}

=========================FIM=============================
apolo

7 Comentários

lucas katia Publicado em4:50 pm - out 1, 2013

Amigo, queria saber se tivermos um balance, colocaremos o IP do balance certo ???

Wilian Shuazeneger Publicado em8:57 pm - dez 9, 2013

Amigo aqui só funciona na minha propiá rede, quando tento acessar de outro lugar ele da erro na porta 80, tem como ajudar?

    Raldyson Publicado em4:01 pm - nov 6, 2016

    também estou com o mesmo problema. Quando acesso de outra conecxao nao da certo. so na conecxao local.

William Primo de Lima Publicado em1:33 pm - abr 13, 2014

Não funcionou aqui, esta tudo certo porem não atualiza nunca.

Bruno Abreu Publicado em9:35 pm - jun 6, 2014

aki não funcionou, na hora que eu tento logar pelo ddns fala usuario e senha invalido… sendo que estão correto, e no log Dns update successufull

Alexandre Arrais Publicado em10:51 pm - dez 5, 2015

Apolo muito obrigado …. Funciona perfeitamente. Troquei a porta 80 para 8080 e funciona sem problemas.

Loraine Publicado em9:21 pm - out 14, 2016

I was just looking at your Configurando um ddns para o mikrotik no site no ip – APOLO RAVI Tecnologia website and see that your site has the potential to become very popular. I just want to tell you, In case you don’t already know… There is a website network which already has more than 16 million users, and the majority of the users are looking for topics like yours. By getting your website on this network you have a chance to get your site more visitors than you can imagine. It is free to sign up and you can read more about it here: http://www.inflightvideo.tv/a/55 – Now, let me ask you… Do you need your website to be successful to maintain your business? Do you need targeted visitors who are interested in the services and products you offer? Are looking for exposure, to increase sales, and to quickly develop awareness for your website? If your answer is YES, you can achieve these things only if you get your website on the network I am describing. This traffic network advertises you to thousands, while also giving you a chance to test the service before paying anything. All the popular blogs are using this network to boost their readership and ad revenue! Why aren’t you? And what is better than traffic? It’s recurring traffic! That’s how running a successful website works… Here’s to your success! Read more here: http://www.inflightvideo.tv/a/55 – Unsubscribe here: http://hothor.se/1u2ei