zgraft
January 27, 2021, 7:19pm
1
What is the best approach for blocking game servers like Fortnite and Valorant? My son likes to play and tends to go over his time allotment.
My thinking is that blocking it via Pi-hole would work great where I can disable Pi-hole for the allowed period of time, after which Pi-hole begins blocking again. Would that work as I'm thinking or is there some other way I should be approaching this?
Is there a good methodology for harvesting server addresses?
Thanks in advance!
How to find the domains to block
Block ads or fix broken sites
This FAQ is written in the context of finding out how to block an ad that isn't blocked automatically, but the same steps can be used to troubleshoot issues with sites that don't function properly. An example is that sometimes certain payment gateways try to collect metrics on the sale, but these domains are blocked by Pi-hole, so the payment cannot be processed. Also, some links send you through several referrers and if one of them is blocked, you may land on a …
ADD
Time-based blocking is not implemented (yet). But you can do this via cron or manual scripts, e.g.
Hello, I'm looking for a way to activate a group from 9 a.m. to 6 p.m. and have it deactivated from 6:01 p.m. to 8:59 a.m.
with school at home I want to block social media during school hours.
Thank you in advance for your help.
1 Like
zgraft
January 27, 2021, 8:57pm
4
Just to follow up on this quickly, disabling Pi-hole for say, 1 hour, won't allow him to play for an hour before he gets booted?
Disabling Pi-hole for a certain amount of time will unblock everything.
zgraft
January 27, 2021, 9:10pm
6
So for my purposes, rather than a crontab (my son doesn't play his games on a regular schedule), a script that disables the blocklist and then re-enables it an hour later would do the same trick.
Use something like pihole disable 60m
in your script then.
As yubiuser pointed out already, you should be aware that this will disable ALL blocking for ALL clients for the specified time.
The linked crontab solution would allow to disable it just for one client (if group management in Pi-hole is configured accordingly).
zgraft
January 27, 2021, 10:26pm
8
Wouldn’t I be able to use the first command in the crontab, a sleep 1h
and then the second command in the crontab?
Sorry, can not follow you here. Which commands are you referring to?
zgraft
January 28, 2021, 1:41pm
10
Sorry, from your second link:
#Enable Block:
0 9 * * 1-5 sudo sqlite3 /etc/pihole/gravity.db "update 'group' set 'enabled'=1 where name='Enfants_cours';" ; /usr/local/bin/pihole restartdns reload-lists >/dev/null
#Disable Block:
0 18 * * 1-5 sudo sqlite3 /etc/pihole/gravity.db "update 'group' set 'enabled'=0 where name='Enfants_cours';" ; /usr/local/bin/pihole restartdns reload-lists >/dev/null
But running each line in a bash script separated by a sleep 1h
.
system
Closed
February 18, 2021, 3:35pm
12
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.