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: resolvectl monitor streams every DNS query live

Network and access
~/tips/tip-dns-resolvectl-monitor

resolvectl monitor

Shows a live stream of the DNS lookups made on this machine.

Ever wondered what your machine looks up when you do nothing? There is a live view for that.

resolvectl monitor shows a continuous stream of the DNS queries that local programs make, with the responses. Leave it running in a terminal and open the app you are curious about.

resolvectl monitor

It shows how many lookups one web page or one chatty app triggers. It also helps when you build a blocklist in Pi-hole or AdGuard Home and want to know which names a device actually asks for.

The limits: the command was added in systemd 252, so older systems do not have it, and it shows only queries issued locally. Upstream traffic between the resolver and the DNS server is not part of it. If you want JSON for a script, add --json=pretty. For what other devices on your network ask, you need the log of your DNS filter instead.

Run it while you open an app for the first time: the list of names can be longer than you would guess, and it is a good first look at what a new tool phones home to.

Further reading: resolvectl manual, On this site: turn on DNS over TLS in systemd-resolved, On this site: resolvectl flush-caches clears the DNS cache on Linux

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