sebagai catatan untuk menangkap gadget yang berada di dhcp-server leases mikrotik kemudian ditambahkan ke addresslist. terserah mau di mark routing atau bagaimana yg jelas sudah masuk di addresslist
: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)") do={
/ip firewall address-list add list=cidr_hs_office address=$dynamicIP comment=$dynamicHOST
:log warning "$dynamicIP added"
}
}
0 comments:
Post a Comment