Gadget To Addresslist Mikrotik

Kali ini saya akan share tips menambahkan gadget ke dalam addresslist mikrotik:local newDynamics value=[/ip dhcp-server lease find dynamic=yes];
:local newList value="";
:foreach i in=[$newDynamics] do={
:local dynamicIP [/ip dhcp-server lease get $i address];
:local dynamicMAC [/ip dhcp-server lease get $i mac-address];
:local dynamicHOST [/ip dhcp-server lease get $i host-name];
:if ($dynamicHOST~"(Andro|andro|Redmi|redmi|Vivo|vivo|Iphone|iphone|Galaxy|galaxy|BLACKBER|Realme|realme|Oppo|oppo|Sony)") do={
      /ip firewall address-list add list=cidr_hs_office address=$dynamicIP comment=$dynamicHOST
      :log warning "$dynamicIP added"
      }
}

script diatas silahkan tambahkan pada system => scheduler

Semoga bermanfaat tips kali ini

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Post a Comment