OpenWRT Parental control for online school in pandemic

Jiashun Zheng
3 min readNov 19, 2020

It is better than no school at all, but the online school does have its problem. The most frequent complaint from my peer parents is about screen time. Fifth graders can spend over 10 hours in front of the screen if no one stops them. while essentially the online class and homework take less than 4 hours. Eye health is just one concern, games, age-inappropriate contents, youtube, twitch (just name a few) are all attracting the kids and as parents, we are concerning.

Blocking Youtube is tricky as sometimes the teacher will assign homework which requires them to watch a video. Another problem is Youtube shared some addresses with some Google services, one of them is Google Classroom that has been adopted by our school district.

Block by time

A straightforward way to stop the prolonged screen time is to set some limitations on when the kids' computer can have internet access. For home networks, this usually happened on the wireless router. Some routers provide basic controls like allowing or blocking connections by MAC address (which is the unique identifier for each device connected to your home wireless network). OpenWRT is an open-source operating system designed for wireless routers. If you happened to have a router that is compatible with OpenWRT (google your router’s model and OpenWRT), then you can flash your router to run OpenWRT.

Once you have the OpenWRT setup, you can add firewall rules to setup a time that you want to block a specific device.

Go to Network -> Firewall -> Traffic Rules -> Click on Add

Adding rules are quite straight forward, just give it a name, and change the source zone to lan, destination zone to wan and wan6. Then use the source address to specify the device’s address. You can also use Mac Address in the Advanced setting. Then select “Reject” in action.

Now set up the time window, you can specify the specific week days, like blocking only weekdays, and input the time window you wish the block to be effective. For the time to work properly, you want to make sure the time zone is correct and its time is synchronized.

To set up time zone go to System->System

Setting up the time zone and synchronize

Troubleshooting:

In the beginning, you may want to test it by using the IP or MAC address of your own device, and if your network provider provides IPV6, you want to use both the IPV4 and IPV6 addresses of the device you are trying to block.

Blocking a specific website in a Mac:

If your kid is using a Mac, there is a way to block a specific website by editing /etc/hosts by adding a line pointing the website to block to 127.0.0.1 (localhost).

127.0.0.1 website.to.block.com

Then run ‘sudo dscacheutil -flushcache’

If none of them works:

Hopefully, we still have physical control of the devices as parents. Good luck.

--

--