.:: Livre ba Ita Atu Asessu TLSNEWS::.

.::Teckno TIMOR LESTE::. ........ .::New Info::. .... INFORMATIKA TIMOR LORO SA"E (TTLS)
<< FATIN ESTUDA Informasaun Konaba Teknologia >> << TIMOR LESTE Teknologia Informasaun >>

TECKNOLOGIA TIMOR LORO SA"E

CONFIGURE & INSTALL

Kamis, 08 Februari 20180 komentar

MIkrotik V5
:global actualIP;
:global newIP;
:set newIP [/ip address get [find interface="pppoe-out1"] address]
:if ($newIP = $actualIP) do={
:log info "Tidak ada perubahan IP...."
  }
:if ($newIP != $actualIP) do={
:log info "IP ether 1 berubah"
:set actualIP $newIP
:delay 5s
/tool e-mail send to="r*******@gmail.com " from=*******@gmail.com server=173.194.79.109 tls=yes   subject="IP change detected by Mikrotik Script" body="IP address yang baru adalah $actualIP"
  }
Mikrotik V6
:global actualIP;
:local newIP [/ip address get [find interface="pppoe-out1"] address];
:if ($newIP = $actualIP) do={
:log info "Tidak ada perubahan IP....";
  };
:if ($newIP != $actualIP) do={
:log info "IP interface pppoe-out berubah";
:set actualIP $newIP;
:delay 5s;
/tool e-mail send to="r*******@gmail.com " from=*******@gmail.com server=173.194.79.109 start-tls=yes   subject="IP change detected by Mikrotik Script" body="IP interface pppoe-out yang baru adalah $actualIP";
  };
3.   Buat scheduler.
Contoh di bawah ini adalah membuat jadwal yang akan menjalankan script, setiap 10 menit.
Mikrotik V5 dan Mikrotik V6
/system scheduler
add disabled=no interval=10m name=schedule1 on-event=CekIPPublik policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api
Share this article :

Posting Komentar

 
Support : Creating Website | ICT Template | Mas Template
Copyright © 2017. Teckno Fraga - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger