Pi-hole as a router and Parental Control ?

:stuck_out_tongue_winking_eye:

But seriously:

This already exists (e.g.):

For a LAN-LAN-firewall realised with a Raspberry Pi you need a second LAN interface (via USB), only RasPi 3B+ an 4B provide Gbit-Ethernet (1000Mbit/s) and only a RasPi 4B is equipped with USB 3.0 for Gbit USB-LAN. The RasPi firewall will be the bottleneck in your network!

Maybe other Hardware suits you more:


Deny or allow access to specific domains on demand by using a script like:

#!/bin/bash
pihole whitelist domain1.tld domain2.tld

to grant access and

#!/bin/bash
pihole whitelist -d domain1.tld domain2.tld

or

#!/bin/bash
pihole blacklist domain1.tld domain2.tld

to block access!


From the Pi-hole documentation: Editing Whitelist and Blacklist
For more details on scripting: Bash Scripting Tutorial

And to automate the execution of the scripts use cron:
A Beginners Guide To Cron Jobs

Addendum: similar request here: Second level Blacklist triggered on a schedule


So you really want Pi-hole to cook you coffee?! :joy: