Maza ad blocking logo

Maza ad blocking

  •  0 ratings
In category: DNS

About Maza ad blocking

Local ad blocker. Like Pi-hole but local and using your operating system.

  •   233  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: 108  
  •   17,000  
  •   57  
  •  Latest commit: Jan 16, 2023  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about Maza ad blocking

🥇 Maza was Top 1 in Hacker News

Comments: https://news.ycombinator.com/item?id=22717650

banner

A command to squash all ads in all browsers

sudo maza start

Like Pi-hole but local and using your operating system.

Simple, native and efficient local ad blocker. Bash script compatible with MacOS, Linux, BSD and Windows Subsystem for Linux (WSL).

  • 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 command.
  • It affects any browser or software installed.
  • Pure Opensource.
  • Just bash.

demo

Help me continue to improve

Buy Me a Coffee at ko-fi.com

📟 Commands

📡 Update database

maza update 

🔨 Start

sudo maza start 

🛠 Stop

sudo maza stop 

⚖️ Status

maza status 

⚙️ Install

😥 Requirements

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

Then you do this.

curl -o maza https://raw.githubusercontent.com/tanrax/maza-ad-blocking/master/maza && chmod +x maza && sudo mv maza /usr/local/bin

Optional but recommended, make a backup of your hosts file.

sudo cp /etc/hosts /etc/hosts.backup

🤖 Auto update of domains to be blocked

Open your cron.

crontab -e

Add the following line at the end.

@daily maza update

🔪 Uninstall

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

🔒 Alternative DNS list

By default the Yoyo DNS list (Peter Lowe) is used. If you want to use another list, like Steven Black's for example, you must modify the variable in line 7.

It would go from:

URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"

To the following:

URL_DNS_LIST="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"

DNSMASQ

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.

MacOS

Linux

MacOS

0 Update Maza

maza update

1 Install

brew install dnsmasq

2 Configure

Edit the file.

/usr/local/etc/dnsmasq.conf

Add the following line at the end.

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

Example

conf-file=/Users/myuser/.maza/dnsmasq.conf

Start DNSMASQ.

sudo brew services stop dnsmasq
sudo brew services start dnsmasq

3 Tell your OS to use your DNS server

Delete the list of macOS 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.

127.0.0.1
208.67.222.222
208.67.220.220

network macos

Refresh your DNS cache

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

4 Restart/Start Maza

sudo maza stop
sudo maza start

Linux (Debian/Ubuntu)

0 Update Maza

maza update

1 Install

sudo apt update
sudo apt install dnsmasq

2 Configure

Edit file in path.

/etc/dnsmasq.conf

Add the following line at the end.

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

Example

conf-file=/home/myuser/.maza/dnsmasq.conf

Start DNSMASQ.

sudo systemctl stop dnsmasq
sudo systemctl start dnsmasq
sudo systemctl enable dnsmasq

3 Tell your OS to use your DNS server

3.1 Gnome Shell

In Gnome Shell, open Settings->Nework. Click in your connection.

network gnome

Add your local server (dnsmasq), and the other 2 belong to OpenDNS, which you can use any other.

127.0.0.1,208.67.222.222,208.67.220.220

gnome dns

3.2 KDE Plasma

In KDE Plasma, open Settings->Nework->Connectios. Click in your connection and tab ip4.

  • Method: Automatic (Only addresses).

Add your local server (dnsmasq), and the other 2 belong to OpenDNS, which you can use any other.

  • DNS Servers: 127.0.0.1,208.67.222.222,208.67.220.220.

kde dns

4 Restart/Start Maza

sudo maza stop
sudo maza start

Bonus: dnsmasq is in charge of solving all DNS

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

no-resolv
server=208.67.222.222
server=208.67.220.220

Bonus: dnsmasq have localhost domains

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

address=/.localhost/127.0.0.1

🍓 CREATE YOUR OWN PI-HOLE SERVER WITH MAZA

You can easily create your own DNS server on a Raspberry Pi, VPS or wherever you want, to connect your devices in just 10 commands thanks to Maza. Follow the tutorial.

⚠️ CAUTION

Remember to make a backup copy of /etc/hosts in case of unforeseen circumstances, neither the project nor its author will be responsible for any possible repercussions derived from not carrying out this action.

🧑‍🎨 Credits

Andros Fenollosa

Comments (0)

Please login to join the discussion on this project.

Maza ad blocking Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Popular Projects

FluxBB

in Social Networks and Forums
 29k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 17k    1    1    0  

Libreddit

in Social Networks and Forums
 5k    0    1    0  

CasaOS

in Self-hosting Solutions
 4k    0    0    0  

Audiobookshelf

in Audio Streaming
 3k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 3k    0    0    0  

Dashboard

in Personal Dashboards
 2k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 17k    1    1    0  

Tube Archivist

in Automation
 2k    0    1    0  

OneDev

in Project Management
 1k    0    0    0  

iodine

in Proxy
 1k    0    0    0  

Alf.io

in Booking and Scheduling
 1k    0    0    0  

sysPass

in Password Managers
 743    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
pCloud Lifetime

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

Technitium DNS Server logo
Technitium DNS Server cover

Technitium DNS Server

An open source authoritative as well as recursive DNS serve…

blocky logo
blocky cover

blocky

Fast and lightweight DNS proxy (like Pi-hole) as ad-blocker…

SPF Toolbox logo
SPF Toolbox cover

SPF Toolbox

Application to look up DNS records such as SPF, MX, Whois, …