Favàritx Firewall
DNS firewall for macOS: encrypts lookups (DNS-over-HTTPS), blocks 270,000 ad and tracking domains, and is controlled from the menu bar. Free software, no dependencies.
An open project with no external dependencies that encrypts your Mac’s DNS lookups and lets ad and tracking blocklists do their job. No App Store, no subscription, and no typing passwords every day.
What it is
Favàritx is a menu bar app for macOS that sits in the system’s DNS. When an app on your Mac wants to know the address of a domain, the question goes through Favàritx: it encrypts it and sends it to the server you’ve chosen (Quad9, Mullvad, Cloudflare, AdGuard or your own). Before anything else, it checks whether that domain is on the ad, tracking or malware lists.
Put simply: it’s your Mac’s doorman. It doesn’t look inside your luggage (that’s encrypted and it can’t get in), but it does decide who you can talk to and who you can call.
Why DNS and not connections
A traditional firewall asks about each connection: “can this program talk to this address?”. Doing that on macOS needs a Network Extension, which is a special Apple entitlement and a paid route. Favàritx doesn’t go there: it works one step earlier, at the moment the Mac asks “where is this domain?”.
That has one good consequence and one bad one:
- Good: it needs no special Apple permissions, works just as well on a three-year-old Mac, and can filter thousands of domains without touching your traffic.
- Bad: it can’t block per app. If you want Telegram blocked but Safari allowed, that’s beyond this design. We say so plainly because it’s the question everyone asks.
What it does in practice
- Encrypts DNS (DNS-over-HTTPS) and tells the system its resolver is
127.0.0.1. The hotel or café wifi, or your provider, can no longer see which domains you look up. - Filters by name, with 270,000 domains from two well-known lists (StevenBlack and 1Hosts Lite). If a domain is on the list, the answer is “doesn’t exist” for every record type, not just addresses.
- Blocks DNS-over-TLS (port 853) so no app can bypass the filter with its own encrypted DNS.
- Has a monitor mode: it notes what it would have blocked and lets it through, so you can try a new list without breaking anything.
- Remembers your decisions: each domain you allow or block by hand is saved with a date and a reason.
- Optionally, a strict mode (kill switch): while no VPN is connected, nothing goes out. It has safety nets so it never leaves your Mac cut off: it disarms itself if no VPN is detected within five minutes.
- Per-network profiles: a specific wifi network can have its own settings.
Requirements
- macOS 14 or later.
- The Command Line Tools (
xcode-select --install). You don’t need full Xcode. - Willingness to spend half an hour in the terminal. There is no graphical installer.
It’s free software (GPL-3.0) and needs no subscription. It isn’t signed with Apple’s paid certificate, so it isn’t distributed as a double-click .dmg: you build it from source. For a technical user that’s even better, because you know exactly what’s inside.
Installation
git clone https://github.com/112books/favaritx.git
cd favaritx
./build.sh # builds and packages Favàritx.app
sudo ./install.sh # daemon + pf rules + app in /Applications
The installer runs six steps and, if anything goes wrong, undoes what it changed:
- Copies the daemon to
/usr/local/libexec/favaritx/. - Creates the configuration in
/usr/local/etc/favaritx/and a token for the local API. - Inserts the pf anchors into
/etc/pf.conf, checking the syntax before applying anything. - Installs the
LaunchDaemonthat starts the daemon with the system. - Enables pf, first noting how it was so it can be undone.
- Copies the app to
/Applicationsand opens it.
At the end it runs the test that matters: it checks that the system resolver (not just the proxy) resolves names. If not, it restores the original DNS and stops the service rather than leaving you offline.
Checking it works
dig +short example.com # should answer, through the proxy
dig google-analytics.com | grep status: # should say NXDOMAIN
The menu bar gives you a panel with live DNS activity: every lookup with its domain, record type, whether it was allowed or blocked, and buttons to allow or block in one click.

The menu bar also gives you quick access: pause protection without opening anything, see how many domains were blocked today, and open the panel.

A detail we like: the legend
When A, AAAA, HTTPS or SVCB show up in the log, the panel explains them: what each record type is and why it matters. The legend comes from the same table the engine uses to write the name, so the legend and the code can never drift apart.
Optional features
Monitor mode, to learn without breaking anything:
sudo ./install.sh --set mode=monitor
Turn the filter off for a moment (for example, because an app is misbehaving):
sudo ./install.sh --set enabled=false
Try another configuration without editing any text file:
sudo ./install.sh --set upstream=mullvad
sudo ./install.sh --set dnsFallback=false # proxy only, no fallback
Uninstalling
sudo ./uninstall.sh # restores DNS, removes rules, binaries and the app
sudo ./uninstall.sh --purge # also deletes the configuration and the lists
The order matters and the script respects it: first it restores the original DNS servers, then it stops the service and finally it empties the pf anchors. Doing it the other way round would leave the Mac pointing at a stopped proxy for a while.
An honest note about pf: when installing, Favàritx enables pf and notes whether it was already on. When uninstalling, it leaves it as it found it. If pf was off before Favàritx (the macOS default), the script turns it off again.
Privacy: what it sees and what it doesn’t
- Favàritx sees the domain names your Mac looks up. They stay on your computer, in a 5 MB rotating log you can delete.
- Favàritx doesn’t see content: web traffic, email and messages are encrypted and don’t pass through it.
- The DoH server you choose does see the domains you look up (encrypted in transit, but it sees them). That’s why you can choose: Quad9, Mullvad, AdGuard, Cloudflare or your own.
- The panel and the API only listen on
127.0.0.1, and the API requires a token that only an administrator can read.
What it doesn’t do, and we won’t hide it
- It doesn’t block per app (that needs a special Apple entitlement we don’t have).
- It isn’t a VPN: it doesn’t hide your IP address.
- It doesn’t encrypt your traffic: HTTPS already does that.
- It doesn’t stop an app talking directly to an IP address without going through DNS. It’s a filter, not a cage.
Status and links
Version 1.0, under active development, with 40 automated tests and documentation in Catalan: architecture, configuration, API, operation, and a guide explaining every feature and its costs.
- Code: https://github.com/112books/favaritx
- Licence: GPL-3.0
- Documentation: the
docs/folder in the same repository
If you try it, tell us what breaks. Above all: what breaks.
