+ Responder ao Tópico



  1. #1

    Padrão Dynamic DNS para DnsExit.com

    # Set needed variables
    :local username "user"
    :local password "password"
    :local hostname "domain"

    :global dyndnsForce
    :global previousIP

    # print some debug info
    :log info ("UpdateDnsExit: username = $username")
    :log info ("UpdateDnsExit: password = $password")
    :log info ("UpdateDnsExit: hostname = $hostname")
    :log info ("UpdateDnsExit: previousIP = $previousIP")

    # get the current IP address from the internet (in case of double-nat)
    /tool fetch mode=http address="ip.dnsexit.com" src-path="/" dst-path="/dnsexit.tmp" port=80 host=ip.dnsexit.com
    :local result [/file get [/file find name=dnsexit.tmp] contents]

    # parse the current IP result
    :local resultLen [:len $result]
    :local currentIP [ick $result 0 ($resultLen-1)]
    :log info "UpdateDnsExit: 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 DynDNS.com - Support -- Developers' Connection -- Update Specifications: Perform Update

    :if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
    :set dyndnsForce false
    :set previousIP $currentIP
    :log info "$currentIP or $previousIP"
    /tool fetch mode=http address="www.dnsexit.com" \
    src-path="RemoteUpdate.sv?login=$username&password=$password&host=$hostname&myip=$currentIP" \
    dst-path="/dnsexit.txt" port=80 host=www.dnsexit.com
    :local result [/file get dnsexit.txt contents]
    :log info ("DnsExit: DnsExit update needed")
    :log info ("UpdateDnsExit: DnsExit Update Result: ".$result)
    :log info ("DnsExit Update Result: ".$result)
    } else={
    :log info ("UpdateDnsExit: No dnsexit update needed")
    }

    Adaptação do Script Dynamic DNS Update Script for ChangeIp.com escrito por Sam Norris.
    http://wiki.mikrotik.com/wiki/Dynami...r_ChangeIP.com

    Charles
    Última edição por charcalcado; 01-08-2011 às 18:27.

  2. #2

    Padrão Re: Dynamic DNS para DnsExit.com

    Vou testar. Obrigado pela postagem!

  3. #3

    Padrão Re: Dynamic DNS para DnsExit.com

    Ta aí colega, gostei. o changeIP sempre caia e eu tinha que refazer o DDNS. Com o dnsexit.com ficou bacana!