Configurar DDNS - CHANGEIP ACESSAR MK-AUTH REMOTO

OLA PESSOAL AGUEM TEM UM TUTORIAL OU A MANEIRA CORRETA DE FAZER ISSO, O QUE TEM QUE FAZER NO MIKROTIK E O QUE TEM QUE FAZER NO MK-AUTH PARA TER ACESSO REMOTO OBS: MEU MODEM ESTA ROTEADO JÁ TENTEI ALGUNS TUTORIAS AQUI MAIS NÃO DEU CERTO ALGUÉM PODE ME AJUDAR COM ISSO POR FAVOR QUE DEUS ABENÇOE A TODOS VOCÊS.  

Para adicionar comentários, você deve ser membro de MK-AUTH.

Join MK-AUTH

Enviar-me um email quando as pessoas responderem –

Respostas

  • Cara? Não entendi sua resposta.

  • Cara essas regras tenho funcionando 100% no meu Mikrotik, só fazer o teu cadastro no Change IP e substituir na regra!

    # Define User Variables
    :global ddnsuser "CHANGEIPUSERID"
    :global ddnspass "CHANGEIPPASSWORD"
    :global ddnshost "FREEHOSTNAME.TOUPDATE.TLD"

    # Define Global Variables
    :global ddnsip
    :global ddnslastip
    :if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }

    :global ddnsinterface
    :global ddnssystem ("mt-" . [/system package get system version] )

    # Define Local Variables
    :local int

    # Loop thru interfaces and look for ones containing
    # default gateways without routing-marks
    :foreach int in=[/ip route find dst-address=0.0.0.0/0 active=yes ] do={
    :if ([:typeof [/ip route get $int routing-mark ]] != str ) do={
    :global ddnsinterface [/ip route get $int interface]
    }
    }

    # Grab the current IP address on that interface.
    :global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface ] address ]

    # Did we get an IP address to compare?
    :if ([ :typeof $ddnsip ] = nil ) do={
    :log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
    } else={

    :if ($ddnsip != $ddnslastip) do={

    :log info "DDNS: Sending UPDATE!"
    :log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
    :global ddnslastip $ddnsip

    } else={
    :log info "DDNS: No update required."
    }

    }

    # End of script

    • Opa

      Consegue fazer esta configuracao para mim.

      Eu lhe pago para fazer e deixar rodando

  • Amigo utiliza essa regra com o ddns da dlink e free e muito facil de fazer..

    :local username "nomedoshost"
    :local password "senha"
    :local hostname "nomedohost.dlinkddns.com"

    :global dyndnsForce
    :global previousIP

    # print some debug info
    :log info ("UpdateDynDNS: username = $username")
    :log info ("UpdateDynDNS: password = $password")
    :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")
    }

     se tiver dificuldade me avise..


  • Não consegue do seu modo da para me explicar detalhes como devo fazer no mikrotik e como vou acessar depois
    MARCELO MEDEIROS disse:

    Amigo utiliza essa regra com o ddns da dlink e free e muito facil de fazer..

    :local username "nomedoshost"
    :local password "senha"
    :local hostname "nomedohost.dlinkddns.com"

    :global dyndnsForce
    :global previousIP

    # print some debug info
    :log info ("UpdateDynDNS: username = $username")
    :log info ("UpdateDynDNS: password = $password")
    :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")
    }

     se tiver dificuldade me avise..


  • Também Não consegue do seu modo da para me explicar detalhes como devo fazer no mikrotik e como vou acessar depois
    Cleber Loncoski disse:

    Cara essas regras tenho funcionando 100% no meu Mikrotik, só fazer o teu cadastro no Change IP e substituir na regra!

    # Define User Variables
    :global ddnsuser "CHANGEIPUSERID"
    :global ddnspass "CHANGEIPPASSWORD"
    :global ddnshost "FREEHOSTNAME.TOUPDATE.TLD"

    # Define Global Variables
    :global ddnsip
    :global ddnslastip
    :if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }

    :global ddnsinterface
    :global ddnssystem ("mt-" . [/system package get system version] )

    # Define Local Variables
    :local int

    # Loop thru interfaces and look for ones containing
    # default gateways without routing-marks
    :foreach int in=[/ip route find dst-address=0.0.0.0/0 active=yes ] do={
    :if ([:typeof [/ip route get $int routing-mark ]] != str ) do={
    :global ddnsinterface [/ip route get $int interface]
    }
    }

    # Grab the current IP address on that interface.
    :global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface ] address ]

    # Did we get an IP address to compare?
    :if ([ :typeof $ddnsip ] = nil ) do={
    :log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
    } else={

    :if ($ddnsip != $ddnslastip) do={

    :log info "DDNS: Sending UPDATE!"
    :log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
    :global ddnslastip $ddnsip

    } else={
    :log info "DDNS: No update required."
    }

    }

    # End of script


  • Obrigado pedro vou fazer aqui e ver como vai ficar que Deus lhe abençoe Jesus Te Ama!.
    Pedro Filho disse:

  • amigos eu tenho o ddns do changeip no meu mikrotik e queria poder redirecionar ele para hotsite local assim como se faz com IP FIXO VALIDO, so que meu ip e dinamico e nas regras de redirecionamento que foi passado pelo pedo em outra postagem era pra colocar a interface de entrada do link e colocar para a porta 80 do mk-auth so que eu fiz isso e nao redirecionou e como tenho clientes na rb nao posso redirecionar todo o trafego, em fim... queria saber se posso fazer esse redirecionamento usando o endereço do ddns. pois quando eu pingo no ddns ele da o ip do modem que esta em bridge. mas nas regras so pega se for por ip nao po endereço. alguma solução para este caso?

  • ja ia esquecendo, pra que serve a opçao de ddns no mk-auth? eu configurei o meu no mk-auth e nao da em nada, nao consigo acessar ele fora da rede e nem dar ping.

This reply was deleted.