An open API service indexing awesome lists of open source software.

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.

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.