viernes, 6 de noviembre de 2015

MIKROTIK | SCRIPT | LOCK | OF MOBILE | BRIDGE |

Publicado por Unknown en 5:52 a. m. ,
NOTE: This is the version to filter by bridge, also prune in firewall to filter or block directly in dhcp-server.
I played in a college without having to leave cell navigation. In this case chooses to put together a script that loops through the list of DHCP Server Leases and filter the hosts called "Android" or "Windows Phone", "Blackberry". With which we could be filtering the most devices. I think they will escape the Chinese phones that often come with very rare operating systems. Also they are leaking cell with Apple OS (setear because I could not not what is your Host Name). But hey, we do not want to reach perfection .. at least that I have taken out of circulation about 50 devices on the first day. Not only I have me down consumption of CPU RB 2011 but it also has much improved performance and bandwidth that cell are updates all the time down, to even being in the pocket.
How are we blocked?
When we opened the list of Leases in "IP - DHCP-Server" you will see a list of all dynamic IP network delivered. One of the fields is "HOST-NAME". That is what interests us. See the picture:

List of names of mobile filter (not detect and filter) (expand)
android-8d0a00d6eddf7787
Android_356434048181508
Windows Phone
BLACKBERRY-8A8D (blank name)
So this is what we use to detect.
The first and second, "android, Android" because mikrotik scripting are not found a command to Upper or Lower Case of the characters. BLACKBERRY me 2 times appears in capital letters (on another router) so for now we will keep it that way. And looking at vendors mac-address could discover that many of the mobile devices that come with the Host-Name blank Samsung, Nokia, etc. So opt for dropearlos as much, if a laptop ... "that puts the computer name". hehe.
Let ours:
To make the script work, we must configure you the name of our DHCP-Server and also the name of the Bridge where we filter (They are the first 2 variables). This part is interesting because if it is also your case, can be on the same team have more than one DHCP Server or more than 1 bridge (one for managers and one for students). Therefore, if this would not be settable, we would ALL quitándote navigation, and do not want managers are angry because they can not check the facebook on your android.


Very good script contains the mac-address of this list (leases), and if they match any of the names we said, no return is automatically filtered.
And I say no return because if you already filter, rather than change the hostname ALREADY !!!.
The good thing about this script is that we are filtering by MAC-address in the Bridge, which is very effective.
The line that says:
($phoneNAME="androi") || ($phoneNAME="Window")

It is taking the first 6 characters of the hostname. Then we could continue adding names seteados devices manufactured with a default name. Example: "Iphone" - just 6. I believe, "rarely changes."

DOWNLOAD | SCRIPT | LOCK | Mobile devices in BRIDGE | MEGA | PDF |


Back Top