• Breaking News

    Friday, 26 January 2018

    139. Mikrotik How to Block Mobile Phone From Accessing the Internet


    You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

    Script:

    #DHCP-Server Name
    :local DHCPServer "Guest";

    #PhallaCCMT.blogspot.com
    :foreach i in=[/ip dhcp-server lease find dynamic=yes active-server=$DHCPServer] do={
    :local DhcpDynMAC [/ip dhcp-server lease get $i mac-address];
    :local DhcpDynCLIENTID [/ip dhcp-server lease get $i active-client-id];
    :local DhcpDynHOST [/ip dhcp-server lease get $i host-name];
    :local phoneNAME [:pick $DhcpDynHOST 0 4];

    #YouCanAddMorePhone
    :if ( ($phoneNAME="BLUS") || ($phoneNAME="iPad") || ($phoneNAME="andr") || ($phoneNAME="Andr") || ($phoneNAME="Wind") || ($phoneNAME="iPho") || ($phoneNAME="BLAC") ) do={
    /ip dhcp-server lease add block-access=yes mac-address="$DhcpDynMAC" use-src-mac=yes comment="$DhcpDynHOST" server="$DHCPServer" client-id="$DhcpDynCLIENTID";
    }
    }
    /ip dhcp-server lease remove [find host-name~"BLUS*"]
    /ip dhcp-server lease remove [find host-name~"android*"]
    /ip dhcp-server lease remove [find host-name~"Android*"]
    /ip dhcp-server lease remove [find host-name~"Windows*"]
    /ip dhcp-server lease remove [find host-name~"iPad*"]
    /ip dhcp-server lease remove [find host-name~"iPhone*"]
    /ip dhcp-server lease remove [find host-name~"BLACKBERRY*"]

    #

    2 comments:

    Fashion

    Beauty

    Travel