Thursday, April 5, 2018

Deny Ip private pppoe indihome


Bagi pelanggan indih*me pernah ngga dapet ip private kepala 10.xx.xx.xx ?
cara dapetin ip public caranya begini

:local iface "indomiesedap"
:if ( [/interface get $iface running] ) do={
:if ( [/ip address get [find interface=$iface] address] in 10.0.0.0/8) do={
/interface disable $iface
delay 2
/interface enable $iface
}
}

kemudian untuk report ke telegram

:local currentIP
:local externalInterface "$iface"
:set currentIP [/ip address get [find interface="$externalInterface"] address]
:for i from=( [:len $currentIP] - 1) to=0 step=-1 do={
:if ( [:pick $currentIP $i] = "/") do={
:set currentIP [:pick $currentIP 0 $i]
}
}

4 comments:

  1. Ini script untuk router apa ya boss?

    ReplyDelete
  2. Iya ni... ini command telnet buat Route Indihome kah? thx berfore

    ReplyDelete
  3. tidak berfungsi jika dial up nya lewat indihome, set modem bridge harus lapor ke plasa.

    ReplyDelete
    Replies
    1. Kalau dial nya lewat indihome caranya bagaimana Om?

      Delete