System-wide Ad and Malware blocker (hosts file GUI)

I would like to develop a GUI app to block ads, malware etc., system-wide, with these features:

  1. Simple GUI.

  2. System-wide blocking (not confined to a specific browser/app).

  3. Uses a collection of reputed hosts files unified by StevenBlack ( ) - this is the default used on pi-hole (other good hosts files are also welcome).

  4. Options (checkboxes) to block these (corresponding to the extensions in StevenBlack’s hosts blocklist):

  • Ads, malware, adware, spyware and other junk.
  • Pornography.
  • Fakenews.
  • Gambling.
  1. No websites will break during normal browsing (for people who don’t visit very bad websites).

Note that a similar app exists on MX Linux, antiX Linux and Peppermint Linux (called advert-block-antix).

If this is a good idea, I’m ready to begin its development. :wink:

Please give your valuable comments and suggestions (and :hearts: if you like this).


I think it sounds useful. Maybe something like it already exists?


Sounds like adguardhome(-bin) (AUR).

AdGuard is networkwide. We are just wanting system wide here. :slight_smile:

1 Like

Existing methos (AFAIK):

  1. Pi-Hole – needs extra hardware.
  2. antiX ad blocker – very old, sometimes messes up hosts file, not available for any distro except MX/antiX and Peppermint.
  3. wget -qO- ${STEVENBLACK_HOSTS} | sed …lot of sed commands… | sort -u | sudo tee -a /etc/hosts – not GUI
  4. Standalone Pi-Hole : Pi-hole - ArchWiki – not GUI
  5. GitHub - hectorm/hblock: Improve your security and privacy by blocking ads, tracking and malware domains. – not GUI, overwrites hosts file
    …<a_lot_of_hosts_file_scripts>… – not GUI
  6. AdGuard et al – requires set up in the router, not GUI
  7. Public DNSes – may slow down browsing (depends on speed of that public DNS in your area), not GUI, requires setup, …
  8. uBlock Origin et al – Superior ad-blocking, but restricted to the browser …

Alternatively, considering the configuration shall be saved in a file anyway – which may also be modified directly as usually practice – you can also simply make a GUI for editing the configuration of an existing blocker.

I would like a simpler approach with the minimum external dependencies.

Anyway, I think a very simple GUI app is better (those who prefer the command-line already have many options).


Actually it’s advert-block-antix. You can download the tarball and run the script from anywhere. It only requires yad and wget.

Yes, but

  1. It has no option to block Pornography, Fakenews or Gambling (as StevenBlack’s hosts do).
  2. It is old (uses some unmaintained hosts and uses separate blocklists instead of a unified one).
  3. May mess up your hosts file (choosing to unblock restores the hosts file as it was on the first run, and may break localhost resolution if you had changed the hostname after the first run).

A useful project using a script already exists:

That’s not correct. You can run PiHole locally and have it blocking all DNS request from a blocklist.

Thanks, this thread reminded me to try Diversion again after a year or so lag, and this time it worked flawlessly, finally no more ads in my home network.
Suits only Asuswrt-Merlin firmware users though.