DL6ER 5ba93c464a Keep filtering queries hidden by dns.ignoreLocalhost
`dns.ignoreLocalhost` returned from `_FTL_new_query()` before the blocking
check ever ran, so queries from `127.0.0.1` and `::1` were forwarded upstream
without ever being compared against gravity or the deny lists. The option is
described as *hiding* these queries, so the lists are expected to still apply -
and trying a blocked domain on the Pi-hole host itself is usually the first
thing one does.

These queries are now processed like every other query and only carry a
`hidden` flag. It keeps them out of every statistic, out of the in-memory
database - and hence out of the query log and the long-term database, which
are both fed from it - and it tells garbage collection to give nothing back
for them, as nothing was ever counted for them in the first place. Their
client and domain records stay alive through a separate `hiddencount`, which
is a reference count rather than a statistic.

A hidden query being a regular query object means that everything running on
the reply keeps working for it, deep CNAME inspection in particular.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2026-08-09 10:59:50 +02:00
2019-06-08 18:35:10 +02:00
2026-06-08 19:59:53 +02:00
2017-06-03 15:05:41 +02:00
2025-03-06 15:04:02 +02:00

Pi-hole logo
Network-wide ad blocking via your own Linux hardware

FTLDNS logo

FTLDNS (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole®'s Web interface.

  • Fast: stats are read directly from memory by coupling our codebase closely with dnsmasq
  • Versatile: upstream changes to dnsmasq can quickly be merged in without much conflict
  • Lightweight: runs smoothly with minimal hardware and software requirements such as Raspberry Pi Zero
  • Interactive: our API can be used to interface with your projects
  • Insightful: stats normally reserved inside of dnsmasq are made available so you can see what's really happening on your network

Official documentation

The official FTLDNS documentation can be found here.

Installation

FTLDNS (pihole-FTL) is automatically installed when installing Pi-hole.

IMPORTANT

FTLDNS will disable any existing installations of dnsmasq. This is because FTLDNS is dnsmasq + Pi-hole's code, so both cannot run simultaneously.

S
Description
The Pi-hole FTL engine
Readme EUPL-1.2
256 MiB
Languages
C 96.8%
C++ 1.1%
Python 1%
Shell 0.7%
CMake 0.3%