Community discussions

MikroTik App
 
skywalter
just joined
Topic Author
Posts: 6
Joined: Thu Nov 07, 2013 9:44 am

How to block android phone by hostame

Thu Nov 07, 2013 9:57 am

Hello everyone,

We have using mikrotik all location and we dont want to use phone wireless networking. When they in dhcp we set them 1.1.1.1 address...
Bu i think some user changed mac adress then use the internet. Because only change mac addresses Hostname is same... Like this;

Image

So, i dont want to change wireless password. How can i block this phone?
 
timberwolf
Member Candidate
Member Candidate
Posts: 274
Joined: Mon Apr 25, 2011 12:08 pm
Location: Germany

Re: How to block android phone by hostame

Thu Nov 07, 2013 10:06 am

Won't help you much, especially if the user, which seems to be no noob, finds this theread. ;-)
 
skywalter
just joined
Topic Author
Posts: 6
Joined: Thu Nov 07, 2013 9:44 am

Re: How to block android phone by hostame

Fri Nov 08, 2013 9:51 am

To bad.. so we have to choice 2 way 1 Mac Filtering or change wifi password.. i will use Mac Filtering, we have any guide for it ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26376
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: How to block android phone by hostame

Fri Nov 08, 2013 3:41 pm

the best solution is always to introduce WPA2 keys. if you leave your AP open like this, anything can happen
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: How to block android phone by hostame

Sat Nov 09, 2013 1:32 am

you can create a script for get the MAC address from the leases and add it to the access list and block those mac address
 
timberwolf
Member Candidate
Member Candidate
Posts: 274
Joined: Mon Apr 25, 2011 12:08 pm
Location: Germany

Re: How to block android phone by hostame

Tue Nov 12, 2013 10:33 am

Won't help him, as the user changes his MAC. Like normis said, only thing is WPA2 setup or key change...
 
wiardiwicaksono
just joined
Posts: 1
Joined: Wed Jul 27, 2016 10:36 am

Re: How to block android phone by hostame

Wed Jul 27, 2016 10:47 am

To block naughty android user with many clonning mac address try to use this script below :
after create this script please running scheduler (every 1 or 5 minutes)

:local hack "android-xxxxxxxxxxxx";    ------------------> fill with hostname to block
:local bnyklease value=[/ip dhcp-server lease find dynamic=yes host-name=$hack];
:foreach looping in=$bnyklease do={
:local ipadd1 value=[/ip dhcp-server lease get $looping value-name=active-address];
/ip firewall filter remove [/ip firewall filter find comment=$hack];
/ip firewall filter add chain=forward action=drop dst-address=$ipadd1 disabled=no comment=$hack;
/ip dhcp-server lease remove [/ip dhcp-server lease find dynamic=yes host-name=$hack];
};

Regards,
Wiwi

Who is online

Users browsing this forum: mojojojo, pajapatak and 110 guests