Kecepatan koneksi dan harga Indihome menjadi daya tarik tersendiri bagi banyak user. Namun belakangan ada sedikit permasalahan bagi sebagian user, yaitu persoalan IP Private ketika terhubung dengan jaringan Indihome.
Hal ini di lakukan oleh Telkom karena keterbatasan alokasi IPv4 milik mereka yang sekarang (mungkin) sudah mulai running out atau habis karena semakin meningkatnya jumlah pelanggan produk internet fiber.
Efeknya adalah bagi user yang menggunakan fitur Opendns dll, yang digunakan untuk meremote perangkat dibelakang router.
MikroTik Deteksi IP Lokal / Public Indihome
Nah, berikut trik bagi user mikrotik yang dial Indihome melalui mikrotik, supaya tidak memperoleh IP Private dari Indihome.
Masuk ke menu PPP >> Profile
Kemudian buat Profile baru
Copy paste kan saja script dibawah ini pada tab script bagian on-up, jangan lupa bagian “pppoe-out1” di ubah menyesuaikan nama interface yang melakukan dial PPPoE, kebetulan di tempat saya bernama “pppoe-out1”.
Copy paste script dibawah ini, dan pilih salah satu script dibawah ini :
Script Pertama
:local PPPOEINTERFACE:set PPPOEINTERFACE pppoe-out1:log warning "Proses Cek IP...":while ([/ping 8.8.4.4 count=1] != 1) do={:delay 0.2}:local IPWAN [/ip address get [find where interface=$PPPOEINTERFACE] address];:set IPWAN [:pick $IPWAN 0 ([:len $IPWAN]-3) ];:if ($IPWAN ~"^[0-9 ]*10") do={:log warning "Terdeteksi IP Private !!!":log warning "IP address anda $IPWAN":log warning "Reconnecting......"/interface pppoe-client disable $PPPOEINTERFACE:delay 3/interface pppoe-client enable $PPPOEINTERFACE} else={:if ($IPWAN ~"^[0-9 ]*172") do={:log warning "Terdeteksi IP Private !!!":log warning "IP address anda $IPWAN":log warning "Reconnecting......"/interface pppoe-client disable $PPPOEINTERFACE:delay 3/interface pppoe-client enable $PPPOEINTERFACE} else={:if ($IPWAN ~"^[0-9 ]*192") do={:log warning "Terdeteksi IP Private !!!":log warning "IP address anda $IPWAN":log warning "Reconnecting......"/interface pppoe-client disable $PPPOEINTERFACE:delay 3/interface pppoe-client enable $PPPOEINTERFACE} else={:log warning "Selamat!!!, Terdeteksi IP Public !!!":log warning "IP address anda $IPWAN"}}}
Script Kedua
# Variables:local currentLocalSiteInterface "pppoe-out1-indihome":local privateRanges {192.168.0.0/16; 172.16.0.0/12; 10.0.0.0/8} :local loopCount 20# Script:local hadMatch:local currentLoop 0:if ([/interface pppoe-client get [/interface pppoe-client find name=$currentLocalSiteInterface] running]) do={ do { :set hadMatch false :local currentLocalSite [/ip address get [/ip address find interface=$currentLocalSiteInterface] address] :local currentLocalSiteAddress ([:pick $currentLocalSite 0 [:find $currentLocalSite "/"]] & \ (255.255.255.255 << (32 - [:pick $currentLocalSite ([:find $currentLocalSite "/"] + 1) [:len $currentLocalSite]]))) :foreach privateRange in=$privateRanges do={ :if (([:pick $privateRange 0 [:find $privateRange "/"]] & \ (255.255.255.255 << (32 - [:pick $privateRange ([:find $privateRange "/"] + 1) [:len $privateRange]]))) = \ ($currentLocalSiteAddress & (255.255.255.255 << (32 - [:pick $privateRange ([:find $privateRange "/"] + 1) [:len $privateRange]])))) do={ /interface disable $currentLocalSiteInterface :delay 2 /interface enable $currentLocalSiteInterface :set hadMatch true :log error "WAN IP address matched private IP address - $privateRange" } } :set currentLoop ($currentLoop + 1) :if ($hadMatch) do={ :delay 2 } } while (($currentLoop < $loopCount) && ($hadMatch)) }
Dua script diatas memiliki fungsi yang sama, cukup pilih salah satu saja ……
Selamat mencoba ….
sumber : sehitam-kopi.blogspot.com/2019/06/mikrotik-auto-redial-pppoe-jika.html + fazar.net/mikrotik-trik-mendeteksi-pppoe-telkom-ip-lokal-shared-ip-publik/