LinuxCommandLibrary

maza

local ad blocker that works by modifying /etc/hosts

TLDR

Enable ad blocking

$ maza start
copy
Disable ad blocking
$ maza stop
copy
Update blocklist
$ maza update
copy
Show status
$ maza status
copy

SYNOPSIS

maza [start] [stop] [update] [status]

DESCRIPTION

maza is a local ad blocker that works by modifying /etc/hosts. It redirects advertising and tracking domains to 127.0.0.1, preventing connections.
The tool downloads blocklists from sources like Steven Black's hosts project, which aggregates multiple sources. Updates fetch the latest lists.
Start mode backs up the existing hosts file and appends blocking entries. Stop mode restores the original hosts file, removing all blocks.
This approach works system-wide, blocking ads in all applications, not just browsers. It's lightweight with no daemon or browser extension required.
DNS caching may delay changes taking effect. Flushing the DNS cache or restarting network services speeds up propagation.

PARAMETERS

start

Enable ad blocking.
stop
Disable ad blocking.
update
Update the blocklist.
status
Show current status.

CAVEATS

Requires root/sudo access. Large hosts files may slow DNS resolution slightly. Some sites detect ad blocking. Can't block ads served from same domain as content. VPNs may bypass hosts file.

HISTORY

maza was created around 2019 as a simple shell script alternative to Pi-hole and other ad-blocking solutions. It provides basic functionality without requiring additional services or infrastructure.

SEE ALSO

pihole(1), dnsmasq(8), unbound(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community