Community discussions

MikroTik App
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Disconnecting users based on time

Sun Nov 10, 2019 10:52 am

Dear MikroTik community,

I need a solution to kick certain MAC addresses out of my WiFi network from time A (let's say 22:00) to time B (6:00). I cannot stop forwarding their packets using IP filter rules as my AP (hAP lite) is in bridged mode (was set to bridged mode by my ISP, because I have a directional radio connection to my provider).

When I had a look at the settings of my device, I figured out that I could deny those devices' access by adding them to the Wireless Access List and just saying "authentication=no" with the command
/interface wireless access-list set 0 authentication=no
Is it possible to somehow automate that command base on current time by means of scripting or do you maybe know a better solution in my case?

Kind regards
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3348
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Disconnecting users based on time

Sun Nov 10, 2019 11:29 am

If it was me you tried to kick out, I just change my mac address.
That I also do on the airport when 30 min free internet runs out. Change mac, get 30 min more.
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Re: Disconnecting users based on time

Sun Nov 10, 2019 11:33 am

But how could I solve this issue then?
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Disconnecting users based on time

Sun Nov 10, 2019 11:51 am

There is the "time" option in the access list itself.
You can have default-authenticate=yes and add some rules, that won't allow authentication in the needed time window.
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Disconnecting users based on time

Sun Nov 10, 2019 11:58 am

Or, to outsmart the ones, who will just change their MAC address, as @Jotne suggested, you can reverse the logic:
- set default-authenticate=no (or add a "drop" rule at the bottom of ACL).
- add rules that will allow authentication to some MACs without any time condition.
- and for some MACs with the time condition.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10550
Joined: Mon Jun 08, 2015 12:09 pm

Re: Disconnecting users based on time

Sun Nov 10, 2019 12:25 pm

Isn't this the thing that "kid control" tries to solve? It should be easy to configure it.
Also, the original assumption that you cannot use IP rules because it is bridged, is not valid. You can set an option in the bridge menu to apply the IP firewall to bridged traffic.
(first setup suitable firewall rules before you enable that)
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3348
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Disconnecting users based on time

Mon Nov 11, 2019 8:26 am

you can reverse the logic:
I would then install wire shark, listen to find all mac address in the net. Then try one by one and see if some gets better internet than others :)