From 3d486e4705005598c29754273f63d24fcb6a8f9a Mon Sep 17 00:00:00 2001 From: Jasper Danan Date: Wed, 3 Oct 2018 18:59:16 +1000 Subject: [PATCH 1/2] Ported Whitelisting and Blacklisting Guide Ported this wiki page (https://github.com/pi-hole/pi-hole/wiki/Whitelisting-and-Blacklisting) to Guides section under "Editing Whitelisting and Blacklisting" Signed-off-by: Jasper Danan --- docs/guides/whitelist-blacklist.md | 85 ++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 86 insertions(+) create mode 100644 docs/guides/whitelist-blacklist.md diff --git a/docs/guides/whitelist-blacklist.md b/docs/guides/whitelist-blacklist.md new file mode 100644 index 0000000..3d9ac13 --- /dev/null +++ b/docs/guides/whitelist-blacklist.md @@ -0,0 +1,85 @@ +### What to Whitelist or Blacklist + +[This extension for Google Chrome](https://chrome.google.com/webstore/detail/whitelist-assistant-by-dn/fdmpekabnlekabjlimjkfmdjajnddgpc) can help you in finding out which domains you need to whitelist. + + +### How to Whitelist or Blacklist + +There are scripts to aid users in adding or removing domains to the whitelist or blacklist. + +The scripts will first parse `whitelist.txt` or `blacklist.txt` for any changes, and if any additions or deletions are detected, it will reload `dnsmasq` so that they are effective immediately. + +Each script accepts the following parameters: + + + + + + + + + + + + + + + + + + + + + + + + +
[domain]Fully qualified domain name you wish to add or remove. You can pass any number of domains.
-dRemoval mode. Domains will be removed from the list, rather than added
-nrUpdate blacklist without refreshing dnsmasq
-fForce delete cached blocklist content
-qQuiet mode. Console output is minimal. Useful for calling from another script (see gravity.sh)
+ +Domains passed are parsed by the script to ensure they are valid domains. If a domain is invalid it will be ignored. + + +##### Example `pihole -w` usages + + + + + + + + + + + + + + + + +
pihole -w domain1 [domain2...]Attempt to add one or more domains to the whitelist and reload dnsmasq.
pihole -w -nr domain1 [domain2...]Attempt to add one or more domains to the whitelist, but do not reload dnsmasq.
pihole -w -f domain1 [domain2...]Attempt to add one or more domains to the whitelist and force dnsmasq to reload
+ +To remove domains from the whitelist: +Add `-d` as an additional argument (e.g `pihole -w -d domain1 [domain2...]`) + + +##### Example `pihole -b` usages + + + + + + + + + + + + + + + + +
pihole -b domain1 [domain2...]Attempt to add one or more domains to the blacklist and reload dnsmasq.
pihole -b -nr domain1 [domain2...]Attempt to add one or more domains to the blacklist, but do not reload dnsmasq.
pihole -b -f domain1 [domain2...]Attempt to add one or more domains to the blacklist and force dnsmasq to reload
+ +To remove domains from the blacklist: +Add `-d` as an additional argument (e.g `pihole -b -d domain1 [domain2...]`) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 445d1f7..2b2b03a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -63,6 +63,7 @@ pages: - 'Guides': - 'Pi-hole as All-Around DNS Solution': guides/unbound.md - 'Configuring DNS-Over-HTTPS on Pi-hole': guides/dns-over-https.md + - 'Editing Whitelisting and Blacklisting': guides/whitelist-blacklist.md - 'Pi-hole and OpenVPN Server': - 'Overview': 'guides/vpn/overview.md' - 'Installation': 'guides/vpn/installation.md' From 8410f36625f5019943ed0e184724bbab0f70115d Mon Sep 17 00:00:00 2001 From: Jasper Danan Date: Sat, 6 Oct 2018 14:50:57 +1000 Subject: [PATCH 2/2] Signed-off-by: Jasper Danan Changed title from 'Editing Whitelisting and Blacklisting' to 'Editing Whitelist and Blacklist' --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 2b2b03a..8605415 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -63,7 +63,7 @@ pages: - 'Guides': - 'Pi-hole as All-Around DNS Solution': guides/unbound.md - 'Configuring DNS-Over-HTTPS on Pi-hole': guides/dns-over-https.md - - 'Editing Whitelisting and Blacklisting': guides/whitelist-blacklist.md + - 'Editing Whitelist and Blacklist': guides/whitelist-blacklist.md - 'Pi-hole and OpenVPN Server': - 'Overview': 'guides/vpn/overview.md' - 'Installation': 'guides/vpn/installation.md'