Skip to content
FossShelf
Home / Categories / For Security Teams

Pi-hole

DNS sinkhole blocking ads for every device on your network.

Replaces Nextdns, Control D, Adguard Dns, Opendns

62.07K starsEUPL-1.2reviewed 5 Nov 2026
Screenshot of Pi-hole

Who it's for

Home network owners wanting device-agnostic ad blocking

Pi-hole protects every device on your home network, including smart TVs, game consoles, and IoT hardware, without installing anything on those devices. One setup covers the whole household automatically when your router DHCP points to Pi-hole.

Your only concern is browser ads on a PC or Mac. A browser extension blocks ads more precisely on those devices with no server to maintain.

Home lab operators adding DNS filtering to existing infrastructure

Pi-hole runs as a single Docker container on a home server, NAS, or existing VM and integrates with home-automation tools through its REST API. Its app-password authentication and group management fit naturally into an already-managed home network.

You have no existing server or Raspberry Pi and are not interested in running any self-hosted services. A cloud DNS service requires no hardware.

Parents wanting centralized content filtering across all household devices

Pi-hole's group management lets you apply stricter blocklists to specific devices or clients without touching each device individually. The query log shows exactly what domains each client requests, giving visibility into household network activity from one dashboard.

You need parental controls beyond DNS blocking, such as time limits, app restrictions, or SafeSearch enforcement. Pi-hole blocks domains but cannot restrict access to specific content on otherwise-allowed domains.

Privacy-focused users minimizing third-party DNS exposure

Pi-hole processes all DNS queries locally and logs them in a local database that never leaves your hardware. This eliminates the DNS-query visibility that cloud resolvers, ISP DNS servers, and commercial filtering services have over your browsing habits.

You need DNS protection on devices outside your home network. Pi-hole only covers devices connected to your LAN; devices on mobile data are unprotected without a separate VPN setup.

The problem

Browser-based ad blockers only protect the browser they run in. Ads and trackers in mobile apps, smart TV interfaces, game consoles, and IoT devices flow through unaffected because those devices either do not support extensions or run entirely different software stacks. A household with ten devices might have protection on two or three of them. Configuring per-device DNS settings is the manual workaround, but it breaks whenever a device reconnects, gets replaced, or joins from a guest account. Network-wide filtering via DNS catches every request to known ad and tracker domains before the connection is made, covering every device without touching any of them individually.

How it works

Network-wide DNS blocking

Intercepts DNS queries for ad and tracker domains before devices can connect, working on every device on the network: phones, tablets, smart TVs, game consoles, and IoT hardware, with no software installed on any of them. Blocklists update automatically through Pi-hole's Gravity system.

Built-in web interface and query dashboard

A web-based dashboard shows total queries, blocked queries, the most-blocked and most-requested domains, per-client activity, query types, and long-term statistics over user-defined time ranges. The dashboard is included with Pi-hole and needs no separate web server.

Built-in DHCP server

Pi-hole can serve as your network's DHCP server, assigning IP addresses alongside DNS settings. This covers networks where the router does not support custom DNS, and optionally includes IPv6 support. It keeps DNS and address assignment in one place.

Group management for per-device rules

Assign clients to groups and give each group its own blocklists and allow rules. Stricter filtering for the kids' tablets, lighter settings for a work laptop, and no filtering for a server all run from the same Pi-hole interface without separate instances.

Full REST API with built-in documentation

Every action available through the web interface can be automated via Pi-hole's REST API. Interactive API documentation is served from each Pi-hole instance, and app passwords let scripts, home-automation tools, and third-party integrations connect securely.

Query log with long-term storage

Logs every domain queried on the network, the client that asked, and what Pi-hole did with the request. Queries are stored in a local database, and the query log supports filtering by time range, client, domain, and query status for ad-hoc network analysis.

Features

  • Network-wide DNS blocking
  • Built-in web interface and query dashboard
  • Built-in DHCP server
  • Group management for per-device rules
  • Full REST API with built-in documentation
  • Query log with long-term storage

How to install

Install Pi-hole on any supported Linux distribution with the official automated installer.

curl -sSL https://install.pi-hole.net | bash

Recommended for this setup

Strengths

  • No subscription fees or recurring costs: Pi-hole runs on hardware you own. After the initial setup, there are no monthly or annual fees, no per-device licensing costs, and no usage caps. Commercial DNS filtering services charge subscription fees for continued use; Pi-hole has no such requirement.
  • DNS queries stay on your hardware: Every DNS query your network makes is resolved or blocked by Pi-hole locally, never sent to a third-party server. Cloud DNS services like NextDNS and AdGuard DNS log queries on their infrastructure. Pi-hole's query log stays on your hardware and is under your control.
  • Blocks ads outside the browser: DNS-level blocking reaches ads in mobile apps, smart TV interfaces, game consoles, and IoT devices that browser extensions cannot touch. Pi-hole's GitHub README states: 'content is blocked in non-browser locations, such as ad-laden mobile apps and smart TVs.'
  • 61,000+ star project with active maintenance since 2014: Pi-hole was first released in 2014 and has accumulated over 61,000 GitHub stars. The volunteer team maintains an active Discourse forum, a subreddit, and an issue tracker. The issue tracker held 24 open issues at the time the research data was collected.

Trade-offs

  • Requires always-on hardware: Pi-hole must run continuously for your network to have DNS. If the device it runs on goes offline, DNS resolution fails for every device on the network unless you configure a fallback DNS server. This means dedicating a Raspberry Pi, VM, or NAS slot to Pi-hole permanently.
  • Only protects devices on your LAN: Pi-hole blocks DNS queries from devices connected to your home network. Phones and laptops on mobile data, public Wi-Fi, or other networks bypass Pi-hole entirely. Pairing Pi-hole with a VPN like WireGuard extends coverage to off-network devices, but adds setup complexity.
  • Router access required for automatic full-network coverage: To protect every device automatically, you need to configure your router to point DHCP clients at Pi-hole for DNS. ISP-provided routers often do not allow custom DNS settings, in which case you must use Pi-hole's built-in DHCP server (requiring the router's DHCP to be disabled) or configure each device manually.

Tech stack

Languages
—
Frameworks
—
Databases
—
Tooling
—

FAQ

What hardware does Pi-hole require?

Pi-hole runs on any supported Linux distribution and needs minimal hardware. A Raspberry Pi 2 or later, an old PC or laptop, a VM, a NAS, or a Docker container all work. The official documentation lists specific prerequisites, but most Linux single-board computers with a few hundred megabytes of RAM are sufficient for a home network. The website specifically notes that a Raspberry Pi, an old PC, a VM, and a NAS all work well as hosts.

Does Pi-hole block ads on mobile data or when outside my home network?

No. Pi-hole only filters DNS queries from devices connected to your home network. A phone or laptop on mobile data, public Wi-Fi, or a different network bypasses Pi-hole entirely. The official website documents pairing Pi-hole with a VPN such as WireGuard as a way to extend protection to mobile devices, but that requires setting up and maintaining a VPN server in addition to Pi-hole.

Can Pi-hole run alongside my existing router's DHCP server?

Yes. The most common setup points your router's existing DHCP server at Pi-hole for DNS, with no changes to how IP addresses are assigned. Pi-hole's built-in DHCP server is optional and only needed when your router does not support custom DNS settings. If you use Pi-hole's DHCP server, you disable the router's DHCP first to avoid conflicts.

What does the EUPL-1.2 license mean for self-hosters?

EUPL-1.2 (European Union Public Licence 1.2) is a copyleft licence. For self-hosters the terms are straightforward: you may freely run, use, and deploy Pi-hole for any purpose, including commercial internal use, with no restrictions. The copyleft requirement applies to distribution: if you distribute Pi-hole or a modified version to others, you must provide the source code and license your distribution under EUPL-1.2 or a compatible licence listed in its appendix. Running Pi-hole on your own network for your household or organization requires nothing beyond the download.

How does Pi-hole update its blocklists?

Pi-hole downloads and merges blocklists through its Gravity system, which pulls from any URL-based list you configure, including community lists with millions of entries. You can subscribe to external blocklists and schedule automatic updates via the web interface or the pihole -g command. Pi-hole also supports allow and deny rules at the domain level, and regex patterns for more precise control over what is blocked or permitted.

Similar tools

More in Security Teams