an ad- and malware-blocking script for Linux
Version 0.999.8.1 (Alpha 8.1)
See https://github.com/gaenserich/hostsblock/commits/master for a complete list of updates
ads.google.com
instead of 0.0.0.0 ads.google.com
block.urls
)sudo
execution for the user, reducing configuration demands-s
(status), -b
(block), -l
(blacklist), -w
(whitelist), -b -o
(unblock), -l -o
(deblacklist), -w -o
(dewhitelist)
-r
subcommand), and even target just blocked domains (with -k
subcommand)For existing hostsblock users, please note the following changes in version 0.999.8:
hostsblock.conf
Due to the shift to POSIX-shell compatibility, the list of blocklists to be downloaded cannot be held in hostsblock.conf
via the blockl ists=
parameter. Instead, this parameter contains the path to a file that contains the list of urls, e.g. /var/lib/hostsblock/block.urls
.
The new block.urls file is simply a newline separated list of urls with no quotations. Whitespace and text after # are ignored. An examp le block.urls file could look like this:
http://hosts-file.net/download/hosts.zip # General blocking meta-list
http://winhelp2002.mvps.org/hosts.zip
http://hostsfile.mine.nu/Hosts.zip
See the example block.urls
in the /var/lib/hostsblock/config.examples
directory for details.
Due to enhanced security and sandboxing, hostsblock no longer handles postprocessing on its own. Instead, users should use other systemd c
apabilities to replace the postprocess() {}
functionality.
Hostsblock comes with systemd service files that replicate the most common scenarios. See the directions above for instructions on how to enable them.
sudo
sudo
is no longer as widely used as before. The man systemd service no longer requires it. You only need it if you want to use the hostsblock -c URL
(urlcheck) utility. See the above directions for details.
hostsblock-urlcheck
symlink is depreciated. Please use hostsblock -c URL
instead./tmp
.