Senin, 24 Maret 2014

Cara Setting IP dynamic Speedy agar dapat diremot dari luar pada mikrotik

Sering kali kita merasa kesulitan untuk memantau mikrotik kita yang dirumah, terkadang
Laptop kita tidak dapat mengakses router mikrotik jika kita tidak mengetahui ip public-nya.
ada beberapa hal yang akan saya jelaskan disini:
1. Laptop Berada di kota Surabaya
2. Mikrotik berada di kota Medan
3. laptop akan mengakses mikrotik memerlukan IP Public.
4. koneksi yang digunakan adalah telkom speedy (ip public-nya berubah-ubah terus atau dynamic ip public)
5. modem adsl biasanya TP-link (Di-set sebagai Bridge) artinya proses dial-up bukan langsung dari modem melainkan dari mikrotik. nantinya IP Public akan terpasang pada Mikrotik (BUKAN MODEM ADSL TP-LINK).
6. bagi yang belum bisa setting pppoe dimikrotik silahkan ke kesini dulu
LANGKAH KERJA:
A. PEMBUATAN DOMAIN PENGGANTI IP PUBLIC
1. buka halaman web http://www.noip.com/  ikuti proses pendaftaran akun-nya.
(Saya anggap anda berhasil registrasi account)
2. silakan login terlebih dahulu.
3. klik tombol host/redirect klik tombol add host



Ket: 
1.isikan nama yang mau dijadikan domain
2. domain bisa sytes.net
3. pilih yang "dns hos A "
4. alamat ip speedy dinamis modem anda
masukkan nama domain anda misal namaanda lalu pilih nama domain induknya misal sytes.net
maka nanti alamat pengganti ip public router mikrotik anda adalah namaanda.sytes.net bukan menggunakan ip public lagi.

jika telah selesai, maka klik tombol add host pada bagian bawah
pada step ini proses pendaftaran nama domain telah sukses. sekarang kita masuk konfigurasi pada mikrotik.

B. PENGATURAN MIKROTIK.
1. buat scripts baru dengan nama  no-ip_ddns_update
system – script. tekan tombol +


pastekan source code nya dibawah ini:
# No-IP automatic Dynamic DNS update
#————— Change Values in this section to match your setup ——————
# No-IP User account info
:local noipuser “emailanda@yahoo.co.id
:local noippass “password-anda
# Set the hostname or label of network to be updated.
# Hostnames with spaces are unsupported. Replace the value in the quotations below with your host names.
# To specify multiple hosts, separate them with commas.
:local noiphost “namadomain-anda.sytes.net
# Change to the name of interface that gets the dynamic IP address
:local inetinterface “pppoe-user-speedy
#————————————————————————————
# No more changes need
:global previousIP
:if ([/interface get $inetinterface value-name=running]) do={
# Get the current IP on the interface
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]
# Strip the net mask off the IP address
:for i from=( [:len $currentIP] – 1) to=0 do={
:if ( [:pick $currentIP $i] = “/”) do={
:set currentIP [:pick $currentIP 0 $i]
}
}
:if ($currentIP != $previousIP) do={
:log info “No-IP: Current IP $currentIP is not equal to previous IP, update needed”
:set previousIP $currentIP
# The update URL. Note the “\3F” is hex for question mark (?). Required since ? is a special character in commands.
:local url “http://dynupdate.no-ip.com/nic/update \3Fmyip=$currentIP”
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info “No-IP: Sending update for $host”
/tool fetch url=($url . “&hostname=$host”) user=$noipuser password=$noippass mode=http dst-path=(“no-ip_ddns_update-” . $host . “.txt”)
:log info “No-IP: Host $host updated on No-IP with IP $currentIP”
}
} else={
:log info “No-IP: Previous IP $previousIP is equal to current IP, no update needed”
}
} else={
:log info “No-IP: $inetinterface is not currently running, so therefore will not update.”
}
atau klik ini source no-ip 
2. buat scheduler baru lalu jalankan script ini setiap  5 menit atau brp menit terserah anda.
/system scheduler add comment="Update No-IP DDNS" disabled=no interval=5m \
name=ip-ddns on-event=no-ip_ddns_update policy=read,write,test

pekerjaan selesai.


Silahkan di remot dari kota mana aja..semoga sukses !!!



Sumber referensi :http://ekomuba.wordpress.com/2013/05/25/setting-ip-dynamic-speedy-menjadi-domain-sytes-net-pada-mikrotik/#comment-146



Tidak ada komentar:

Posting Komentar