Repository navigation
Installation
Packages for Debian, Ubuntu and Arch are attached to each release; there is no package repository yet. Every package installs everything and enables nothing: see Turning protection on.
x86_64 systems with systemd, iptables 1.8.9 or later (nft or legacy backend) and Python 3.11 or later.
| Distribution | Python | Tested in CI |
|---|---|---|
| Debian 12 (bookworm) | 3.11 | unit + firewall suites in containers, system suite in a qemu VM |
| Debian 13 (trixie) | 3.13 | same |
| Ubuntu 24.04 LTS | 3.12 | containers, system suite natively on a GitHub runner |
| Ubuntu 26.04 LTS | distro | same |
| Fedora 44 | 3.14 | containers, qemu VM |
| Arch Linux | rolling | containers, qemu VM |
CI also builds, lints, installs and removes the real package on every push for Debian 12/13, Ubuntu 24.04/26.04 and Arch.
Derivatives (Manjaro, Linux Mint, Pop!_OS, ...) are expected to work but are not tested in CI. Ubuntu 22.04 is not supported: its polkit 0.105 has no JavaScript rules.
| Debian / Ubuntu | Fedora | Arch | |
|---|---|---|---|
| Daemon and CLI | python3-dnspython python3-httpx python3-h2 python3-jeepney iptables |
python3-dns python3-httpx python3-h2 python3-jeepney iptables-nft |
python-dnspython python-httpx python-h2 python-jeepney iptables |
| GUI | python3-pyqt6 |
python3-pyqt6 |
python-pyqt6 |
| Building translations | qt6-l10n-tools |
qt6-linguist |
qt6-tools |
Download the file for your distribution from the latest release, together with SHA256SUMS. <v> is the version.
| Distribution | Command |
|---|---|
| Debian 12 | sudo apt install ./blockads-linux_<v>_debian12_all.deb |
| Debian 13 | sudo apt install ./blockads-linux_<v>_debian13_all.deb |
| Ubuntu 24.04 | sudo apt install ./blockads-linux_<v>_ubuntu2404_all.deb |
| Ubuntu 26.04 | sudo apt install ./blockads-linux_<v>_ubuntu2604_all.deb |
| Arch Linux / Manjaro | sudo pacman -U blockads-linux-<v>-1-any.pkg.tar.zst |
| Others (Fedora, ...) | tar xf blockads-linux-<v>.tar.gz && cd blockads-linux-<v> && make && sudo make install |
Check the downloads first: sha256sum -c SHA256SUMS --ignore-missing. Then go to Turning protection on.
The sections below build the same packages from the source tree.
git clone https://github.com/MateusBMP/blockads-linux.git
cd blockads-linux
make arch-pkg # make dist (a tarball of the tree) + makepkg
sudo pacman -U packaging/arch/blockads-linux-*.pkg.tar.zstThe PKGBUILD packages a source tarball of the checkout. A pacman hook restarts a running daemon after the package or one of its Python libraries is upgraded. Removing the package (pacman -R blockads-linux) stops the service and removes the firewall rules first.
git clone https://github.com/MateusBMP/blockads-linux.git
cd blockads-linux
cp -r packaging/debian debian
sudo apt build-dep ./
dpkg-buildpackage -us -uc -b
sudo apt install ../blockads-linux_*_all.debapt remove blockads-linux stops the service and removes the firewall rules; apt purge also deletes the settings, lists and logs in /var/lib/blockads-linux. Python byte code is compiled at install time and again after a Python upgrade (dh-python).
make # builds the translations; needs lrelease (see Dependencies)
sudo make install
sudo make uninstall # later- Every installed path is recorded in
/var/lib/blockads-linux-install.manifest; runningmake installagain upgrades. - It refuses to overwrite a file it did not install (for example one from a package) and changes nothing in that case.
- If a copy or a system step fails, the files are put back as they were.
- A changed
/etc/blockads-linux/firewall.confis kept; the new default is written next to it asfirewall.conf.new. - On SELinux systems (Fedora) the executables get the
bin_tlabel (semanage fcontext), which a systemd service needs for its TCP connections. -
make uninstallstops the units, removes the firewall rules and exactly the recorded files. Settings and logs in/var/lib/blockads-linuxand theblockadsuser are kept.
sudo systemctl enable --now blockadsd.service blockads-update.timer blockads-update.path
blockadsctl statusThen open BlockAds from the application menu. The GUI can start the service without a password, but only an administrator can enable it at boot.
tests/vm/install.sh install|uninstall installs the tree the same way for the disposable test VMs and CI runners.
| Path | Contents |
|---|---|
/usr/lib/blockads-linux/ |
private Python code, launchers, blockads-fw, blockads-fw-emergency.sh
|
/usr/bin/blockadsctl, /usr/bin/blockads
|
CLI and GUI |
/etc/blockads-linux/firewall.conf |
firewall options (root-owned) |
/var/lib/blockads-linux/ |
settings, compiled lists, query log and statistics |
/run/blockads-fw/ |
helper state and lock (gone after a reboot) |
| systemd units |
blockadsd.socket, blockadsd-ipv6.socket, blockadsd-bridge.socket (opt-in), blockadsd.service, blockads-update.{service,timer,path}, blockads-failsafe.service
|