freebitco.in

Duck DNS Update Script For Mikrotik

In Mikrotik

Duck DNS Update Script For Mikrotik

# Duck DNS Update Script for MikroTik RouterOS 5.26 behind NAT

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

:local ducktoken "your-token"
:local duckdomain "your-domain"
:local ddnshost "$duckdomain.duckdns.org"

#------------------------------------------------------------------------------------
# No more changes need

:local ipddns [:resolve $ddnshost]

/tool fetch mode=http address="icanhazip.com" src-path="/" dst-path="/icanhazip.txt"
:delay 3
:local result [/file get icanhazip.txt contents]

:local resultLen [:len $result]
:local endLoc [:find $result "\n" -1]
:local ipfresh [:pick $result 0 $endLoc]
:log info "Duck DNS: IP detected from icanhazip.com is $ipfresh"

:if ($ipddns != $ipfresh) do={
    :log info "Duck DNS: Old IP is $ipddns"
    :log info "Duck DNS: New IP is $ipfresh"
    /tool fetch url="http://www.duckdns.org/update\?domains=$duckdomain&token=$ducktoken&ip=$ipfresh" dst-path=duckdns.txt
    :global ipddns $ipfresh
    :log info "Duck DNS: IP updated to $ipfresh!"
    } else={
     :log info "Duck DNS: Current IP is $ipddns"
     :log info "Duck DNS: Detected IP is same with current IP, dont need changes"
    }
}

 

source : http://wingloon.com/2014/06/28/duck-dns-update-script-for-mikrotik-routeros-5-26-behind-nat/

Related Search

Tags: #duck dns #mikrotik #SCRIPT #UPDATE

Anda sedang membaca artikel tentang Duck DNS Update Script For Mikrotik. Silahkan baca artikel Be Log tentang Mikrotik lainnya. Semoga bermanfaat ...

Setup Storage Path The Dude di RB750G r3
Setup Storage Path The Dude di RB750G r3
The Dude merupakan tool yang cukup penting
Cara Membuat Certificates di MikroTik
Cara Membuat Certificates di MikroTik
Certificates yang dibuat pada Mikrotik ini dapat
Bypass Nawala dan Internet Positif di Mikrotik
Bypass Nawala dan Internet Positif di Mikrotik
Mungkin sudah banyak yang bahas, tapi ga

Top