Maza, like Pi-hole but local and using your macOS or Linux

Maza ad blocking - Like Pi-hole but local and using your operating system

Simple, native and efficient local advertising blocker. Compatible with OSX and Linux.

  • You don't have to install any browser extensions or applications, you just use the tools of your operating system.
  • You update the list of DNS to be blocked with a single stroke.
  • Opensource.
  • Just bash.


:satellite: Update database

maza update

:hammer: Start

sudo maza start


sudo maza stop

⚖️ Status

maza status

⚙️ Install

:eyes: Requirements

  • bash 4.0 or higher
  • curl
  • Only OSX users, gsed : brew install gnu-sed

Then you do this.

curl -o maza && chmod +x maza && sudo mv maza /usr/local/bin

:hocho: Uninstall

sudo rm /usr/local/bin/maza && sudo rm -r ~/.maza


Unfortunately the hosts file does not support sub-domains (wildcards), which is necessary to correctly filter all DNS. You will need to install locally a server for that purpose, Maza supports the Dnsmasq format. Here's an example for OSX.

1 Install

brew install dnsmasq

2 Configure

Edit the file.


Add the following lines.

conf-file=(your user path)/.maza/dnsmasq.conf


sudo brew services stop dnsmasq
sudo brew services start dnsmasq

3 Tell your OS to use your DNS server

Delete the list of OSX DNS servers and add the 3 addresses. The first one will be your local server, and the other 2 belong to OpenDNS, which you can use any other.

Refresh your DNS cache

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Bonus: dnsmasq is in charge of solving all DNS

Add in confiigure file: /usr/local/etc/dnsmasq.conf


Bonus: dnsmasq have test domains

If you want all your .localhost domains, for example, point to localhost add in confiigure file: /usr/local/etc/dnsmasq.conf


:warning: CAUTION