notracking / hosts-blocklists

Automatically updated, moderated and optimized lists for blocking ads, trackers, malware and other garbage
2.31k stars 146 forks source link

PiHole and whitelisting #89

Closed umpire7777777 closed 6 years ago

umpire7777777 commented 6 years ago

I tried to whitelist www.googleadservices.com so I can click on links in google shopping. I know it will open up more ads. IT's still getting blocked. DO you have guidance on how to use these lists and allow whitelisting via PiHole?

I used the CLI method to add the whitelist (pihole -w www.googleadservices.com)

beerisgood commented 6 years ago

Did you clear your Browser and OS DNS-Cache ?

Also use "pihole -g" command

notracking commented 6 years ago

Pi-Hole does not fully support domain filters/whitelisting, but it still uses dnsmasq in the background.

For a normal dnsmasq setup you can assign a whitelist file, by adding the following line to your dnsmasq config file (for a Pi-Hole: /etc/dnsmasq.d/99-pihole-custom-lists.conf), make sure it's loaded before the blocklist. conf-file=/path/to/domain.whitelist.txt

You can add whitelisted domains by adding them to your /path/to/domain.whitelist.txt file and restart dnsmasq sudo service dnsmasq restart. Some examples (1.2.3.4 is the ip of your dns server):


address=/1.2.3.4/notsoevildomain.com
address=/1.2.3.4/sub.domain.com