How to block internet access for kids by schedule using pfsense

Hardware Apr 19, 2020

Or block by schedule, not only for kids but for devices

First things first, create an alias on pfsense that will aggregate all the IPs that should be blocked from accessing the network. You can look in Status/DHCP Leases to find the required device IP address. So note them down and head to Firewall/Aliases. The first tab should be the one selected by default: IP.

Firewall Aliases

Now click on Add button to create a new IP alias.

Create new IP alias

Give it a name, Kids in my example, set the IP address and click on Add Host to add other IP addresses as needed. Once you're done click Save. It should look like in the screenshot below.

Final Kids alias

Now that you have an alias that contains the IPs, you will need to create a schedule for the internet access. For this, go to Firewall/Schedules and click Add to create a new one.

AccessDenied schedule

My AccessDenied schedule has gaps from 9AM to 12AM and 14:00 to 19:00 in the evening, for every day of the week.

With the alias and the schedule in place, we are going to create a firewall rule that will block all traffic going to the IPs in the alias according to the specified schedule.
So go to Firewall/Rules and select the LAN tab. Click Add to create a new rule.

Firewall rule to block alias by schedule

Action should be Block, Protocol set to Any. Source is "Single host or alias" and the value is the name of the alias Kids. Show the Advanced Options and scroll to Schedule where you enter the name of the schedule you have previously created, AccessDenied in my example. Click Save, don't forget to Apply Changes.

Now you can grab a cup of coffee and listen to the kids trying to argue about the schedule...

Tags

Radu

Since there's no place like 127.0.0.1, I try my best to keep it up to date and add network services using various (mostly old and cheap) network devices.