There is a new beta version of Pi-hole which may interfere with the capabilites of this script. I will check into this and see if PSS will work! Until then, keep posted!
Barry Quiel for fixing the Python version. This may be the future of PSS!
To install Pi-hole SafeSearch (PSS), simply run the following commands in your pi-hole terminal (log into pi with ssh; pi hole should be set up and running).
-
Download the Pi-hole SafeSearch script:
wget https://raw.githubusercontent.com/jaykepeters/PSS/master/Pi-hole_SafeSearch.sh
-
Move the script.
sudo mv ./Pi-hole_SafeSearch.sh /usr/local/bin/
-
Make the script executable.
sudo chmod a+x /usr/local/bin/Pi-hole_SafeSearch.sh
-
Enable Pi-hole SafeSearch:
sudo Pi-hole_SafeSearch.sh -e
- Click on the "Custom DNS Tab"
- For every provider you want, type in their domain name and SAFE IP addresses.
- Google is tricky because they have some 300 top-level domains, so users could bypass SafeSearch by going to google.ca in the us, etc.
- Bing, DuckDuckGo, and other providers should be fine. You want to make sure to add the www, as well as non-www variants for those search providers. Duck.com also redirects to duckduckgo.com right now as well...
If you wish to not enforce SafeSearch on your network anymore, please follow the steps below to completely uninstall PSS
Pi-hole_SafeSearch.sh --disable
- PSS creates the following files:
/var/log/pss.log
/etc/pss.ack
/tmp/safesearch.txt
/etc/dnsmasq.d/05-restrict.conf
(Version < 2.0)/etc/dnsmasq.d/SafeSearch.conf
- Version 2.1 will have the --uninstall option
- User has to type y/n to confirm
- All files will be deleted, including the script
- GET
- /getStatus
- /getStatus/{provider}
- /getStatistics
- /getStatistics/{provider}
- POST
- /enable/{provider}&auth={KEY}
- /disable/{provider}&auth={KEY}