Linux Format

KEEP CONTROL OF YOUR KIDS

-

The internet is harmful for children, we’re told, and Pi-hole offers parents an intrusive insight into the sites they visit, when they visit them and on what devices. Monitoring your offspring’s online activity without telling them is morally dubious, but imposing controls, and setting boundaries is not.

One way you can use Pi-hole is as a sort of timed access control for youngsters. The first thing to do is create three blocklists within your /var/ www/html directory. We’re calling them

active_blocklist.txt, blank_list.txt and

block_everything.txt. The first two files are empty, and the third contains only .* – the regex to block everything.

In the Pi-hole interface, create a group for all of your child’s devices.

Add the blocklist as http://localhost/ active_blocklist.txt, and specify in the drop-down that it should only apply to your child’s group.

Next, we’re creating a couple of scripts in our home directory. The first, block_script.sh, used for blocking all sites, reads: cp /var/www/html/block_everything.txt

/var/www/html/active_blocklist.txt pihole -g

The second, unblock_script, reads: cp /var/www/html/blank_list.txt /var/ www/html/active_blocklist.txt pihole -g

Next up, we create two new crontabs: $ sudo crontab -e

30 23 * bash /home/pi/block_script.sh 0 6 * bash /home/pi/unblock_script.sh

The first blocks all websites at 11.30pm, while the second unblocks them again at 6am.

You don’t have to block everything, of course, but some regex relating to TikTok, Snapchat or whatever else the kids are using right now should ensure a good night’s sleep.

It doesn’t only have to apply to kids, either. If you’re not getting much work done because you spend too much time on social media, you can easily block yourself during working hours.

Newspapers in English

Newspapers from Australia