Setting up Pi-hole goes in this order: give the host a permanent address, run the installer (the Pi-hole documentation says it takes less than ten minutes), test it on a single device, put its address in the router’s DHCP DNS field, then check that nothing walks around it. Pi-hole’s own OPNsense router guide describes the finished result as the path “(Clients) -> Pi-hole -> Upstream DNS Server”. A changing address and a second DNS entry that points elsewhere are the traps to avoid up front. The router change is the one that reaches every device at once, so this page puts it after the install and the one-device test.
Don't miss new tech stories on Google
Add Tech Insider once in the Google app and our stories appear in your news suggestions.
Reserve the host’s address before the installer runs
Pi-hole is a DNS sinkhole that, in the project’s words, protects devices “without installing any client-side software”, and it is free, open-source software. The docs also say it runs smoothly with minimal hardware, so the host choice is mostly about what you already own and leave switched on.
| Host | Suits | Keep in mind |
|---|---|---|
| Raspberry Pi 4 or 5 | A box that does one job | Check current board prices before buying (see the price note below) |
| Spare laptop or mini PC | Reusing hardware you already own | Needs to stay on and stay on your network |
| Virtual machine | Homelabs with a hypervisor | Snapshot before every change |
| Docker container | An existing Linux server or NAS | Use Pi-hole’s official Docker images, listed as the third install route |
If you buy a board for this, Raspberry Pi’s price notice says that from October 1, 2026 the 2GB variants rose by $12.50, to $67.50 for the Raspberry Pi 4 and $77.50 for the Raspberry Pi 5. The 1GB variants of both boards are unchanged. That is what the notice stated when checked on November 13, 2026.
Whatever you choose, fix its address first. Pi-hole’s prerequisites page states: “Pi-hole needs a static IP address to properly function (a DHCP reservation is just fine).” If the address drifts after a router reboot, every device you pointed at it loses name resolution. The simpler route is a DHCP reservation in the router that ties one address to the host’s MAC address. The alternative is a static address on the host itself.
For the static-address route on a host whose network is managed by NetworkManager, nmcli can set it. The addresses below are examples; substitute your own host address, gateway and DNS server, and the connection name that nmcli con show prints:
nmcli con show
sudo nmcli con mod "CONNECTION_NAME" ipv4.addresses 192.168.1.10/24 ipv4.gateway 192.168.1.1 ipv4.dns "1.1.1.1" ipv4.method manual
sudo reboot
Run the installer: pipe it, or read it first
The basic install page gives the quick route as a single piped command, then adds a caution: “Piping to bash is a controversial topic, as it prevents you from reading code that is about to run on your system.” For readers who would rather review the code first, it provides two alternatives (clone the repository, or download the installer), and lists Docker as a third. Pick one per host.
# Route one: pipe straight to bash
curl -sSL https://install.pi-hole.net | bash
# Route two: clone the repository, then run the installer
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
sudo bash basic-install.sh
# Route three: download the script, read it, then run it
wget -O basic-install.sh https://install.pi-hole.net
less basic-install.sh
sudo bash basic-install.sh
The docs describe the installer as one that “walks you through the process”, so follow its prompts. The less line in route three is where you read the downloaded script before running it. Older guides run less pihole-install.sh and bash pihole-install.sh; the docs now name the file basic-install.sh, so the equivalents are less basic-install.sh and sudo bash basic-install.sh, as above. Afterwards, set the admin password with sudo pihole setpassword (listed on the pihole command reference; the pihole -a -p shown in v5-era guides is not the v6 route). Then open http://PIHOLE_IP/admin/ with your own host address. Use the address rather than pi.hole, which will not resolve on a device that is not yet using Pi-hole. The docs describe the dashboard as a responsive web interface for viewing and controlling Pi-hole; the Query Log in it is the screen you will use for every check below.
One v6 detail matters if you run other web services on the same host. Pi-hole’s v6 post-release notes say most users should have been offered a dialog during the upgrade to disable lighttpd, and that “Unless you are using lighttpd for any other web service, it is no longer needed.”
Three ways to hand Pi-hole to your devices
Nothing is filtered until a device is told to ask Pi-hole. Test with one device before touching the router. On a laptop, set its DNS server by hand to the Pi-hole address, then run (with your own Pi-hole address in place of PIHOLE_IP):
dig doubleclick.net @PIHOLE_IP
dig google.com @PIHOLE_IP
If a domain on one of your enabled blocklists, such as the first one here, comes back without its real address, filtering works; the second domain should resolve normally. Both lookups should then appear in the Query Log. If they do not, fix that before going further, because the router change would only copy the same problem to every device.
| Route | Who it covers | Where you enter it | What the vendor pages say |
|---|---|---|---|
| Router hands out Pi-hole as the DNS server | Every device that takes its DNS setting from the router | The DNS servers field of the router’s DHCP or WAN settings | OPNsense guide: Pi-hole on the first line, second line blank unless another Pi-hole host runs |
| Pi-hole as the DHCP server | Every device that takes its lease from Pi-hole | Settings > DHCP on Pi-hole itself, after DHCP is switched off on the router | Docs: Pi-hole “can optionally function as a DHCP server”, so all devices are protected automatically |
| One device by hand | That device only | The device’s own network settings | The safest first test, because nothing else on the network changes |
The first row is the route the rest of this page follows. In the router’s DNS field, Pi-hole’s OPNsense guide says to put the Pi-hole address on the first line and leave the second blank unless you run another Pi-hole host. After the change, a device may keep its old DNS until its lease renews; the same guide suggests toggling Wi-Fi off and on, or disconnecting and reconnecting the Ethernet cable for a couple of seconds, to speed that up.
If you would rather have Pi-hole hand out the leases itself, Pi-hole’s post-install page says to “just be sure to disable DHCP on your router first (if it has that feature available).” Then enable DHCP under Settings > DHCP in the Pi-hole dashboard, matching your existing subnet and address range. Do not leave two DHCP servers running on one network.
ASUS and OPNsense: which page, which field, what to leave blank
ASUS’s Pi-hole FAQ makes one point that decides where you click: the function is the same for connected clients, and only the router’s firmware version determines whether the Pi-hole address goes on the LAN page or the WAN page.
| Router | Page | What to enter | Leave alone or watch for |
|---|---|---|---|
| ASUS, firmware 3.0.0.4.386.45898 or later | WAN, Internet Connection tab | Set “Connect to DNS Server automatically” to No, enter the Pi-hole IP as the DNS server, click Apply | Devices connected to the router through a VPN client are not filtered |
| ASUS, firmware older than 3.0.0.4.386.45898 | LAN, DHCP Server settings | The Pi-hole IP as the DNS server handed to clients | Same VPN-client limit |
| ASUS, IPv6 | IPv6, IPv6 DNS Setting | The Pi-hole IPv6 address on the IPv6 DNS server line, then Apply | Set separately from the IPv4 entry |
| OPNsense, IPv4 DHCP | The DHCP server’s DNS servers section | The Pi-hole IPv4 address on the first line | Second line blank unless another Pi-hole exists |
| OPNsense, IPv6 | Same section, IPv6 address of Pi-hole | A reachable IPv6 address of the Pi-hole host | Link-local IPv6 addresses are not reachable from other VLANs |
On OPNsense, find the host’s addresses first: Pi-hole’s guide says to SSH in and run ifconfig eth0, substituting your network interface.
The OPNsense guide also records two traps. If you use the OPNsense address as Pi-hole’s upstream resolver while the router forwards DNS to Pi-hole, “this will cause a resolver loop”. And if you add firewall rules to stop clients such as Chromecasts from using hardcoded DNS servers, the rule that lets Pi-hole itself do DNS must sit above the reject-all-DNS rule: OPNsense acts on the first rule that matches, and a reject rule placed first stops Pi-hole reaching any DNS server. The guide adds that its tutorial does not explain how to block DoH or DoT. For any other router, look for the setting that supplies DNS servers to DHCP clients and apply the same single-entry rule.
Check the router change, then find what walks around it
After saving the router setting, renew the lease on a second device and watch the Query Log. A device that appears there is using Pi-hole. One that never appears is going elsewhere. Pi-hole’s docs say content is blocked “in non-browser locations, such as ad-laden mobile apps and smart TVs”, so check a smart TV and a phone app, not just a browser. Because Pi-hole works at the DNS level, an ad delivered from the same hostname as the content it sits in cannot be separated from it, which is why some in-video ads survive.
| Symptom | Cause | Fix |
|---|---|---|
| No internet on any device after the router change | Likely the host is off or the address was typed wrong in the router | Recheck the address in the router, confirm the dashboard still opens at the host’s address, and put the old router DNS back while you work |
| pi.hole/admin will not open | The name does not resolve on a device not yet using Pi-hole | Browse to the host’s IP address followed by /admin |
| A device never shows in the Query Log | It may still hold its old lease | Toggle Wi-Fi off and on, or reconnect the Ethernet cable |
| Pi-hole resolves nothing behind OPNsense firewall rules | The reject-all-DNS rule sits above the allow rule for Pi-hole | Move the allow rule above the reject rule |
| Lookups time out or loop | The router is Pi-hole’s upstream while also forwarding to Pi-hole | Use a different upstream, such as the Unbound setup below |
| A Chromecast or TV ignores Pi-hole | It uses a hardcoded DNS server | Block outbound DNS from other hosts with firewall rules; the OPNsense guide says its rules do not block DoH or DoT |
| Phone on the router’s VPN is unfiltered | ASUS notes that ads cannot be blocked when a device connects to the router using a VPN client | Compare with the VPN client switched off |
| IPv6 clients are unfiltered | Possibly only IPv4 DNS was set | Add the IPv6 address (ASUS: IPv6 DNS Setting; OPNsense: use a non-link-local address) |
Local names, Unbound and cloudflared: optional upgrades
Keeping router-assigned names working
As of November 13, 2026, this feature is called Reverse server, the successor to what older guides call conditional forwarding. The FTL configuration reference lists the setting dns.revServers as an “Array of reverse servers”, each in the form "<enabled>,<ip-address>[/<prefix-len>],<server>[#<port>][,<domain>]", so several domains and targets can be configured without editing dnsmasq files.
Unbound as a private upstream
Pi-hole’s Unbound guide has you run a recursive DNS server and point Pi-hole at it. Install Unbound (first line below), create /etc/unbound/unbound.conf.d/pi-hole.conf with the configuration from the guide (copy it from there so it matches the current version), restart Unbound and test it:
sudo apt install unbound
sudo systemctl restart unbound
dig pi-hole.net @127.0.0.1 -p 5335
Once that returns an answer, the guide says to configure Pi-hole by “specifying 127.0.0.1#5335 in the Settings > DNS > Custom DNS servers section and ensuring that all the other upstream servers are unticked”. The unticking matters: a leftover preset upstream means some queries can still go to it. Unbound is optional, and filtering works without it. Never combine it with a router upstream that forwards back to Pi-hole, which is the resolver loop described above.
A cloudflared upstream
Pi-hole’s cloudflared guide says to “configure Pi-hole to use the local cloudflared service as the upstream DNS server by specifying 127.0.0.1#5053 as the Custom DNS ( IPv4 )”. Take the install and service commands from the guide itself. Use cloudflared or Unbound as the upstream, not both.
Blocklists and keeping the install current
For more coverage, The Firebog is a curated directory of lists; its key says lists in green and bulleted with a tick “are least likely to interfere with browsing”, so start there. Add a list under Settings > Blocklists, then run an update, and check the Query Log after each addition so you can tell which list changed what.
To update a bare-metal install, run sudo pihole -up; Pi-hole’s update page describes it as “as simple as running the following command”. For Docker, the basic install page points to the Docker docs section for the official images. As of November 13, 2026, the latest tag on the docker-pi-hole releases page is 2026.11.0, released November 11, which carries FTL v6.9 and Core v6.6; its notes say it fixes 11 security advisories. That supersedes the 2026.10.0 set of October 17 (FTL v6.8, Core v6.5). After each update, point one device at Pi-hole by hand, repeat the two dig lookups and confirm both appear in the Query Log before trusting the router setting again.





