Mikrotik: Shutting Off Traffic at Specific Times

My kids use my gaming system (PS3) for watching videos on Amazon and Netflix. Due to the layout of my home, it’s very convenient. Unfortunately, it’s also very convenient for one of the kids to just turn things on at night and binge-watch their favorite shows until they fall back asleep in front of it. After seeing this happen a couple of times, I decided I needed to do something about it… Which, that was turn off internet access to the PS3 when they should be sleeping.

My current router is a Mikrotik hAP AC Lite with the default configuration. This is a little unideal for the purposes here, but it should still prove useful for those looking for how to limit traffic to an IP or device within a time range. For those who prefer just seeing the code, it’s here:

;;; No PS3 9:30pm-6am
;;; inactive time
chain=forward action=drop src-address= in-interface=bridge out-interface=ether1
time=21h30m-6h,sun,mon,tue,wed,thu,fri,sat log=no log-prefix=""

This is set under IP > Firewall > Filters

Identifying the IP address to filter

In my situation, I have the PS3 hardwired the router. However, because I was using the default setup, I had to use Torch on the bridge to identify the IP address assigned to the PS3:

Mikrotik - running torch to identify bridge

I just used the process of elimination to identify the appropriate IP address. Once I had the IP address, I created a new filter rule under IP > Firewall > Filter Rules.

Creating the firewall filter rule

Under the ‘General’ tab of the newly-created rule, I chose Chain > Forward, specified the source address (PS3 IP address), in interface (bridge), and out interface (ether1):

Creating a firewall filter rule in Mikrotik routers

Under the ‘Extra’ tab, I selected the times I wanted the PS3 traffic stopped as well as the days of the week:

Mikrotik Firewall Filters - Times and Days of Week

Finally, under the ‘Action’ tab, I chose ‘Drop’:

Mikrotik firewall filter rules - drop traffic option

In the firewall filter rules list, the rule will be red when it’s inactive:

List of mikrotik firewall filter rules - red when inactive

That’s all there is to it. Now, there may be more than one way to accomplish this, and I’m certainly not a Mikrotik expert. However, this works and it’s just one more fun thing that can be done with Mikrotik routers.

If you have any questions or critiques, feel free to post them in the comments below.

Related Articles:

Posted on Published

One Reply to “Mikrotik: Shutting Off Traffic at Specific Times”

Leave a Reply

Your email address will not be published. Required fields are marked *