Package Details: hostsblock 0.999.8.1-1

Git Clone URL: (read-only, click to copy)
Package Base: hostsblock
Description: An ad- and malware-blocking utility for POSIX systems
Upstream URL:
Keywords: adblock
Licenses: GPL
Submitter: jav209
Maintainer: jav209
Last Packager: jav209
Votes: 52
Popularity: 0.142641
First Submitted: 2012-05-03 23:18
Last Updated: 2019-04-07 21:14

Dependencies (12)

Required by (0)

Sources (1)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

madalu commented on 2019-04-15 22:11

Package is missing a cache directory in /var/lib/hostsblock. Without the cache directory, hostblock fails with the following messages:

FAILED to refresh/download blocklist...

If I create the cache dir, the errors go away. This is probably an upstream bug, since hostblock should be smart enough to create the cache dir if it doesn't exist.

jav209 commented on 2019-04-07 21:15

Version 0.999.8.1 (Alpha 8.1)
  • Fixed typos in various docs (Thanks to @glitsj16)
  • Made installation more distro-neutral (Thanks to @glitsj16)

jav209 commented on 2019-04-06 19:28

See for a complete list of updates

Systemd Job Improvements
  • Systemd service now heavily hardened and sandboxed for enhanced security
  • Fixed simultaneous download feature so that it actually does what it is supposed to
  • Added processing support for source blocklists that just list domain names to be blocked, e.g. instead of
  • Added support to read directly from zip and 7z files containing a single file without decompressing to a cache
  • Optimized filters used to process domains with improved throughput
  • If run with dash instead of bash, hostsblock has significant performance improvements
  • Removed annotation feature to reduce dependencies and overall processing demands
  • Vastly expanded list of potential blocklists (see block.urls)
POSIX-Compatibility Improvements
  • Supports POSIX shells (dash, ash, zsh) instead of just bash
  • Removed GNU-specific utilities, relies only on POSIX options
  • Should now run on *BSD and macOS (and perhaps even Android and iOS!) if proper POSIX environments are installed. UNTESTED
UrlCheck Mode Improvements
Upgrading to 0.999.8

For existing hostsblock users, please note the following changes in version 0.999.8:

Changes in 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: # General blocking meta-list

See the example block.urls in the /var/lib/hostsblock/config.examples directory for details.

No more postprocessing within script

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.

Changes with 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.

  • The hostsblock-urlcheck symlink is depreciated. Please use hostsblock -c URL instead.
  • In UrlCheck mode, large hosts files will generate large temporary cache files that will eat up a lot of temporary storage. If you have a machine with little RAM (<6GB) and want to block a lot of domains, consider changing your $tmpdir to an HDD- or SSD-backed filesystem instead of the default tmpfs under /tmp.
  • UrlCheck mode will not be able to provide information on which blocklist blocked which domains anymore (annotation feature removed)
  • Hostsblock uses as default redirection IP address instead of theoretically offers better performance without the need of a pseudo-server.

jav209 commented on 2018-01-19 19:55

Version 0.999.7 (Alpha 7) (19.01.2018)

  • Typo fixes in

  • Added cryptomining block lists

  • Fixed permission errors in packaging (thanks @madalu)

  • Added optdepend (pixelserv-tls) (thanks @liljaylj)

  • Fixed superficial warning

liljaylj commented on 2018-01-19 18:39

Hello @jav209, I am maintainer of pixelserv-tls package here on AUR. pixelserv-tls - is like pixelserv, but works over HTTPS, too. I would be really appreciate if you add pixelserv-tls to optional dependencies. Thanks.

madalu commented on 2017-12-05 23:24

Would it be possible to change the default permissions on /var/lib/hostsblock to 755 so as to workaround the following issue:

I've added dnsmasq to the hostsblock group, but it fails to access /var/lib/hostsblock/hosts.block unless the directory is world readable.

jav209 commented on 2017-08-06 13:52

@Shebang, no, you didn't hose anything, I did. Fixed in Version 0.999.6-3

Shebang commented on 2017-08-05 21:18

Sweet, one other problem I've encountered is that hostsblock is supposed to be run as the user hostsblock but in your package function it only sets root up with exec permissions on /usr/bin/hostsblock

Or did I hose something when I configured this?

jav209 commented on 2017-08-04 18:31

@Shebang: Revised in Version 0.999.6-2.

Shebang commented on 2017-08-04 14:03

Hey jav209, my system doesn't have a hostsblock user on it. It's required to build the package though. If I add the user manually it appears to build fine.

==> Starting package()...
install: invalid user ‘hostsblock’
==> ERROR: A failure occurred in package().