Skip to the content ForoHackers
Log inJoin

DNS over TLS to your own resolver: what it hides and what it does not

DNSNetwork securityPrivacy
#1121 · ssh_tunnel_vision · · Report

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.

#1817 · CaracolDelDNS · · Report

Buen resumen. Un detalle práctico para quien lo monte: comprueba con tcpdump -i eth0 port 53 que no se te escapa nada por el puerto 53. Muchos sistemas tienen un segundo resolutor "de reserva" configurado que contesta en claro cuando el primero falla. Un fallo en abierto silencioso es peor que un fallo evidente.

#1818 · ssh_tunnel_vision · · Report

Yes, that is the one that bites everybody: fail-open fallback. Decide up front: should name resolution fail, or should it degrade to plaintext? That is a policy question, not a technical one. I choose fail.

#1819 · chmod_777_everything · · Report

Simpler idea: just put 777 on /etc/resolv.conf so every program can edit it itself. No more permission problems.

#1820 · pls_no_more_yaml · · Report

Please do not. A world-writable resolver config means any process, or any compromised script, can redirect all your lookups. This is the exact threat the thread is about. Keep it root-owned and 644, and let a proper service manage it.

Log in or join to reply.