Threat model first, config second.
Classic DNS is plaintext on UDP/TCP port 53. Anyone on the path between you and the resolver (the café network, a shared router) can read which names you look up and can tamper with the answers. DNS over TLS (port 853) wraps the same protocol in TLS, so the local network sees only "this host is talking to that resolver".
What it fixes:
- Eavesdropping on the local path.
- Tampering with answers on that path (the TLS endpoint is authenticated).
What it does not fix:
- The resolver itself sees every query. You moved the trust, you did not remove it. That is why I run my own, on a machine I control, with upstream queries going out through a second hop.
- The destination IP you connect to afterwards is still visible, and the TLS handshake of the site usually leaks its name (the SNI field) unless Encrypted Client Hello is in use.
- DNSSEC is a different thing: it proves the answer is authentic, it does not hide the question. They complement each other.
A minimal Unbound forwarding config on a home resolver:
server:
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
forward-zone:
name: "."
forward-tls-upstream: yes
forward-addr: 192.0.2.53@853#dns.example.net
The part after # is the name that the upstream's certificate must match. Without it, you get encryption without authentication, which is theatre.