From 58f448e0d7b906899faa2a0422ab6bb11b235dbe Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Tue, 19 Jan 2016 17:08:45 +0000 Subject: [PATCH] Add documentation for whitelist and blacklist scripts --- Whitelisting-and-Blacklisting.md | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Whitelisting-and-Blacklisting.md diff --git a/Whitelisting-and-Blacklisting.md b/Whitelisting-and-Blacklisting.md new file mode 100644 index 0000000..48133dc --- /dev/null +++ b/Whitelisting-and-Blacklisting.md @@ -0,0 +1,76 @@ +There are two 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
-nrAdd or removed domains, but don't reload dnsmasq
-fForce dnsmasq to reload even if the script did not detect any changes to the list
-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 `whitelist.sh` usages + + + + + + + + + + + + + + + + +
whitelist.sh domain1 [domain2...]Attempt to add one or more domains to the whitelist and reload dnsmasq.
whitelist.sh -nr domain1 [domain2...]Attempt to add one or more domains to the whitelist, but do not reload dnsmasq.
whitelist.sh -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 `whitelist.sh -d domain1 [domain2...]`) + +#####Example `blacklist.sh` usages + + + + + + + + + + + + + + + +
blacklist.sh domain1 [domain2...]Attempt to add one or more domains to the blacklist and reload dnsmasq.
blacklist.sh -nr domain1 [domain2...]Attempt to add one or more domains to the blacklist, but do not reload dnsmasq.
blacklist.sh -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 `blacklist.sh -d domain1 [domain2...]`) \ No newline at end of file