https://github.com/gssparks/pi-hole-filter-scheduler
Systemd timers to schedule Pi-Hole filters.
https://github.com/gssparks/pi-hole-filter-scheduler
internet internet-access pi-hole systemd-timers
Last synced: 2 months ago
JSON representation
Systemd timers to schedule Pi-Hole filters.
- Host: GitHub
- URL: https://github.com/gssparks/pi-hole-filter-scheduler
- Owner: GSSparks
- Created: 2022-10-15T12:55:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-01T16:36:13.000Z (almost 2 years ago)
- Last Synced: 2025-04-07T02:47:20.861Z (2 months ago)
- Topics: internet, internet-access, pi-hole, systemd-timers
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pi-Hole Filter Scheduler
I use these two sytemd timers and services to turn on and off Pi-Hole filters at certain times. I use this to deny all access to DNS after a certain time depending on the day of the week, and then turn access back on at 7:00am every morning.
The service executes a sqlite3 command on Pi-Hole's database setting enable to 1 or 0. 1 = filter on, and 0 = filter off.
How to use:
- Create a new group called 'internet-access-scheduler'
- Add clients that you want to schedule to this group
- Create a Pi-Hole regex filter to block all access [:alnum:].[:alnum:]
- Add the internet-access-scheduler group to this filter
- Edit the internet-access-schedule-off.service and internet-access-schedule-on.service files to reflect the filter you created. Put your newly created filter id where it says id. HINT: You can find the filter id by hovering your mouse over the regex on the Pi-Hole web interface.
- Finally, change the times in the internet-access schedule-off(on).timer to suit your needs.
- Sit back and smile while your children kick and scream because their internet all of the sudden was blocked at 7:00 pm.
Visit my post about this scheduler here for step by step instructions.