Thursday, 28 April 2016

Update Ip Public dengan No-IP

awalnya jgn lupa buat akun baru di no-ip.com setelah itu setting mikrotiknya dengan

1. /Setting - script - new beri nama no-ip_ddns_update
centang policy nya :
  • write
  • test
  • read
2. Paste source code di bawah ini di kolom source.

# Dynamic DNS for ChangeIP.com behind NAT
# Modified by Jorge Amaral, officelan.pt
# For support send mail to support at offficelan dot pt
#
# The original script was written by "webasdf" on the Mikrotik foruns, i just modified it to work with ChangeIP.com
#
# Here is where you need to set your definitions
:local user "user"
:local pass "password"
:local host "host.ddns.info"
##############
##############
:global lastwanip;
:if ([ :typeof $lastwanip ] = "nothing" ) do={ :global lastwanip 0.0.0.0 };
:local wanip [:resolve $host];
:if ( $wanip != $lastwanip ) do={
    /tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
    :local result [/file get dyndns.checkip.html contents]
    :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]
    :set lastwanip $currentIP;
    :put [/tool dns-update name=$host address=$currentIP key-name=$user key=$pass ]
}






3. Buat scheduler  baru
 
/system scheduler add comment="Update No-IP DDNS" disabled=no interval=5m \
name=no-ip_ddns_update on-event=no-ip_ddns_update policy=read,write,test

1 comment:

  1. Jackpot City Casino Web Download - DCCASINO
    Jackpot City Casino Web Download. Enjoy a fantastic gaming experience 코인카지노 with over 250 thrilling games every day 카지노사이트 at Jackpot City Casino. Jackpot 10bet City Casino is powered by

    ReplyDelete