On my network I want to block internet access for a group of devices that, identified by mac-address and during a an certain time of the day (say between 20:00-08:00 everyday) by schedule.
How can I accomplish this in my Mikrotik with RouterOS 6.24?
The “plan” I’m getting stuck at is:
creating the address list based on mac-addresses
creating the schedule for blocking
creating the firewall rule to block/drop access to wan based on 1 and 2
adding the src-ip-address and what external ip-address and ports they want to visit to a list to review.
The “time” argument you’ll notice takes the form of “time since 00:00:00 today”, dash, “duration since starting time”. The interval between 20:00:00 and 8:00:00 the next day is 12 hours, hence the above.
I guess the difference between the two is that with the masquerading rule only wan-access is blocked but the internal network can be used and the “drop-rule” makes sure that networking is not possible at all?
No. In both cases, the internal network would work.
The only difference I can think of is that with the masquerade variant, you can still ping LAN IPs from a WAN neighbor to the router (IF that neighbor is clever enough to route LAN IPs to your router…), while with the drop rule, you can’t. Very esoteric…
Somehow the time settings are giving me a failure “start time bigger than end time”. So I guess I have to break tem up in two rules. Onde for the time between 20:00-23:59 and one for the time 00:00-08:00.
If you are assigning IP addresses for each MAC by DHCP, than go to IP - DHCP Server - Leases and you have a list of all active IP addresses, double click on the address and enabled Block access option.
BTW all this wont work on most new phones like Samsung etc as they by default generate new MAC address every time they connected, just keep that in mind..
Host name can only be used in conjunction with DHCP server that can update DNS server records while assigning new address lease to a device. DHCP server on ROS can’t do it automatically (and DHCP lease data can’t be directly used in firewall rules).