I want to set-up an Internet whitelist (a feature NOT AVAILABLE in my modem/router) using a Raspberry Pi Zero W (RPi0W). As answered in this post, I have made changes to /etc/privoxy/config:

Screenshot of /etc/privoxy/config

As in this example, the RPi0W is supposed to allow only facebook.com and amazon.com. But it is not happening. I can browse any website.

I also have tried setting the DNS in WiFi settings of the client machine (like the computer I am writing this post on) to IP address of the Pi.

IP Configuration of WiFi is the IP of the Pi.

Please note that I have installed PiHole on the Pi which is working as expected with IP configuration as above. I have tried adding the whitelist domains/websites to Whitelist of PiHole (just for a try), it again allows all traffic through it (except ads). I can Blacklist desired domains in PiHole though.

Any ideas what is wrong with my configuration of the RPi0W?


  • I'm not sure if that matters, but there are spaces before and after the curly brackets. Have you tried "{ +block }" instead of "{+block}"?
    – Fabian
    Sep 21 '18 at 11:21
  • @Fabian I tried what you suggested. Still no luck. I have updated the image. Thanks any ways.
    – Kumar Kush
    Sep 21 '18 at 11:51
  • How do you start the script privoxy?
    – Fabian
    Sep 21 '18 at 14:35
  • 1
    Remove the other DNS server from your router ( so there is only the Pihole. Build your entire whitelist, including Raspberry Pi repositories, then blacklist all sites. Sep 21 '18 at 17:23
  • 1
    No. The secondary DNS on the router is used if the Primary fails. The Pihole has forwarding DNS servers set (check in the web settings for the DNS tab) for after it has done its filtering. Sep 22 '18 at 20:45

Setup dnsmasq to use* as its default dns server, which will result in every dns request failing. Then set up your whitelisted domains in dnsmasq.conf, as eg
etc, etc
which will then make queries to those domains use google dns.

* any local IP you know will not be running a dns server

Taken from Reddit

  • Thanks. I am working on dnsmasq as you suggested. Done quite a lot of things so far. I can update dnsmasq.conf and add server=/xxxxxx lines. But please tell me how do I "Setup dnsmasq to use* as its default dns server"?
    – Kumar Kush
    Sep 22 '18 at 12:41
  • serverfault.com/q/799200 asks the question on how to bind dnsmasq to loopback but you may need to read the dnsmasq manual or pro actively search that one. Sep 22 '18 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.