brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: pihole reloaddns flushes the DNS cache of Pi-hole

Network and access
~/tips/tip-pihole-reloaddns

pihole reloaddns

Clears the Pi-hole DNS cache and reloads it, without restarting the whole service.

You changed a DNS record, but one device keeps getting the old answer. Before blaming the device, check if the resolver still has the old answer cached. On a Pi-hole there is a command for that.

pihole reloaddns

The Pi-hole docs describe it as: flush and reload the pihole-FTL DNS cache. It’s one of two related commands:

  • pihole reloaddns flushes and reloads the DNS cache.
  • pihole reloadlists reloads the DNS lists,.

Run it on the Pi-hole itself, or in a container with docker exec and the container name. Afterwards ask again from a client, for example with dig example.com, and compare the answer with what you expect.

The caveat comes straight from the docs: both commands do not re-read any *.conf files. If you changed a config setting, this is not the command for it. A device can also keep its own cache, so the old answer may live on the client after the Pi-hole has let go of it.

The same docs page carries the same note for reloadlists: it reloads DNS lists and does not re-read any *.conf files. So neither command is a general restart, and it is worth checking which of the two you actually need before running one.

Further reading: Pi-hole docs: the pihole command

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link