Posted by: Hartoto | 09/19/2015

Cara Akses IP Dinamik IndiHome Telkom – Mikrotik

Ini adalah artikel pertama saya tentang jaringan. Dimulai dengan rasa penasaran saya terhadap mikrotik, saya mulai rajin hunting cari literatur Beruntung saya punya guru mikrotik yang bisa diandalkan. Siapa lagi kalau bukan kak Kifli, beliau network Administrator UNM, sertifikat mikrotiknya sudah sampai MDCINE. Saya biasa panggil beliau dengan sebutan suhu jaringan…

Langsung saja. Kasusnya adalah bagaimana mengakses IP IndiHome Telkom yang selalu berganti-ganti. Akses ini untuk kepentingan monitoring dari publik. Solusinya adalah dengan menggunaakn layanan dinamic DNS pihak ketiga. Disini mikrotik yang saya gunakan RouterOs 5.5, belum ada fitur CloudIP. JAdi saya memilih http://www.changeip.com, alasannya karena fiturnya lebih lengkap dan literaturnya lebih banyak.

  1. Silakan register di http://www.changeip.com. MAsukkan alamat email dan password sesuai keinginan
  2. Order layanan Dinamic DNS, pilih domain yang disuka. Saya pribadi lebih suka .dyndns.pro, setelah itu selesaikan prosesnya hingga akhir.
  3. Masuk di Mikrotik via winbox. Pilih menu System > Scripts. Buat  baru, copas kode ini

# Dynamic DNS Update / Simple Edition
# Written by Sam Norris, ChangeIP.com
# Copyright ChangeIP.com 2009-2010
# For support send mail to Support@ChangeIP.com
#
# 2009-06-22 RouterOS 3.25 Tested
# 2009-10-05 RouterOS 4.01rc1 Tested
#
# OVERVIEW:         %
#  This script will update a ChangeIP.com dynamic dns hostname
#  with an ip address located directly on an interface.
#                   %
# NOTES:            %
#  IF THIS SCRIPT DOES NOT PRODUCE ANY OUTPUT PLEASE COPY AND PASTE IT
#  AGAIN.  THERE PROBABLY IS A LINE BREAK IN THE WRONG PLACE! Once you
#  have created this script and tested that it works by running it
#  manually you can schedule it to run every few minutes.
#                   %
# CONFIGURATION FIELD DEFINITIONS:
#  ddnsuser:  Enter your ChangeIP.com user id.
#  ddnspass:  Enter your ChangeIP.com password.
#  ddnshost:  Enter the hostname (www.example.com) to update.
#  ddnsinterface:  Enter an interface name – case sensative.
#                   %
#                   %
#                   %
#                   %
#               %   %   %
#                %  %  %
#                 % % %
#                   %
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EDIT YOUR DETAILS / CONFIGURATION HERE
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:global ddnsuser “nama user”
:global ddnspass “password”
:global ddnshost “alamat subdomain”
:global ddnsinterface “interface internet, misal ether2”
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:global ddnssystem (“mt-” . [/system package get [/system package find name=system] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip

:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info “DDNS: No interface named $ddnsinterface, please check configuration.” }

:if ([ :typeof $ddnslastip ] = “nothing” ) do={ :global ddnslastip 0.0.0.0/0 }

:if ([ :typeof $ddnsip ] = “nothing” ) 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 changes necessary.”

}

}

# END OF SCRIPT

 

==========================

5.  Masuk di system > Scheduler. Beri nama, pilih interfalnya 00 15 00, kemudian on Eventnya tulis sesuai nama script pada langkah empat.

6. Selesai, silakan coba akses subdomain Anda.


Responses

  1. artikel menarik , Afra

  2. excellent submit, very informative. I wonder why the other experts of this sector do not
    understand this. You must continue your writing. I’m confident, you’ve a huge
    readers’ base already!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: