Repository navigation
Configuration
Everything except the firewall options is stored by the daemon in /var/lib/blockads-linux/ and changed through the GUI or blockadsctl.
- Presets: System (the network's DNS), Quad9, AdGuard, Cloudflare (and Family), Google, OpenDNS (and FamilyShield), DNSBunker.
-
Custom servers: plain UDP/TCP, DNS over TLS, DNS over HTTPS (HTTP/2), also as
sdns://stamps. DoQ and DoH3 whenaioquicis installed. - Default: Quad9 over DoH, falling back to Quad9 plain DNS with a visible warning.
- Encrypted only disables the plain fallback. If the clock is wrong (certificates "not yet valid" or "expired"), plain DNS is still allowed for NTP server names only, so the time daemon can fix the clock.
- When the upstream is unreachable (captive portal, outage) the policy moves to the network's DNS, still filtered. It never turns protection off.
- The catalog has the same ~100 lists as blockads-android, grouped as ads, privacy, social, annoyances, security, regional and other.
- Defaults: StevenBlack Unified, EasyPrivacy, URLhaus Malicious URL Blocklist, Phishing URL Blocklist, Dandelion Sprout Anti-Malware, uBlock Origin Badware risks.
- Lists are downloaded from their original publishers and compiled locally by
blockads-update(hourly timer; auto-update every 6/12/24/48 h or manual; "unmetered connections only" is available). - Custom lists can merge one or more URLs. Adding a URL needs the admin password, because it makes the system download from a new host.
- Rule syntax is the same as Android's (hosts, adblock and plain domains, matching subdomains). Difference:
@@exceptions are honored, but only within the list that declares them.
-
Block, allow (whitelist) and
*.example.com(subdomains only). - Precedence: allow, then whitelist, then block, then the lists.
- Import from a file or the clipboard, and export.
| Option | Default | Notes |
|---|---|---|
| Block response |
0.0.0.0 / ::
|
or NXDOMAIN, REFUSED |
| SafeSearch (Google, Bing), YouTube Restricted | off | |
| DoH blocklist | off | blocks 34 known DoH server names, so browsers cannot bypass the filter |
| CNAME check | on | also blocks answers whose CNAME chain points to a blocked name (CNAME cloaking) |
| Preferred IP type | both | IPv4 or IPv6 only |
| Query log | on | retention, pause recording, clear |
Trusted networks are keyed by the NetworkManager connection UUID (not just the Wi-Fi name, so an evil twin with the same SSID is not trusted; the GUI warns about it). Two modes:
-
pause: no filtering while connected (state
trusted). - network DNS: keep filtering but use that network's DNS servers, e.g. for internal names on a work network.
The Networks page also shows split DNS (per-link servers and domains), for example from a WireGuard VPN.
DNS from Docker bridge containers does not pass through OUTPUT, so it is not filtered by default. (Resolvers that run on the host for the bridge, such as libvirt's dnsmasq or podman's aardvark-dns, are filtered already, because their upstream queries leave through OUTPUT.)
The opt-in bridge redirect filters them too. Set bridge_interfaces (GUI: Advanced → Containers and VMs). The suggested value is:
docker0,br-+,virbr+,podman+,cni-podman+,lxcbr+,incusbr+
This enables blockadsd-bridge.socket on port 154 and redirects port-53 traffic arriving on those interfaces to it. It is not an open resolver: only redirected packets reach port 154, and the daemon answers only sources in the subnets of matching interfaces. DNS over TLS from containers is not blocked.
Tested with Docker (default and user networks), podman, libvirt and firewalld zones.
/etc/blockads-linux/firewall.conf is root-owned, at most 16 KiB, with a strict schema. The GUI changes it with pkexec blockads-fw set-config and restarts the service.
port=153 # admin-only; must match the socket units
ipv6=auto # auto | off
block_dot=true # reject DNS over TLS/QUIC on port 853
block_webrtc=false # reject STUN/TURN ports (WebRTC IP leaks)
bypass_cidrs=100.100.100.100/32,fd7a:115c:a1e0::53/128 # never redirected (Tailscale MagicDNS)
bridge_interfaces= # empty = off; see above
bridge_port=154 # admin-only; must match blockadsd-bridge.socketPorts must be privileged (1–1023), not 9 or 53, and different from each other. An invalid file makes the service fail to start, which means DNS stays unfiltered (fail-open).
Settings and rules can be saved as JSON and restored (blockadsctl backup / restore, or Settings → Backup / Restore…). A BlockAds for Android blockads_settings.json (v1 and v2) can be imported; it is merged into the current settings.