NewsCrawler.org

ISP caught hijacking DNS queries and returning a tampered IP address

While debugging a homelab problem — a Podman container that could not reach an external site — the author ran dig on the domain and found that Google DNS, Cloudflare and almost every other resolver returned the same IP address, while Cloudflare's DoH endpoint[1] returned a completely different one. A lookup of who owned the first IP showed it belonged to the ISP, meaning the ISP was hijacking DNS queries and returning a tampered address. The direct fix is encrypted DNS: DoT (DNS over TLS)[2] or DoH (DNS over HTTPS)[1].

Unbound is a local resolver that queries its way from the root nameservers to a domain's authoritative nameserver, but as the author explains while addressing misconceptions from replies to a tweet about the discovery, it does not protect by default. Resolving a name can span multiple connections, and those intermediate queries traditionally travel as plaintext DNS over UDP, so the ISP can snoop on or tamper with them; protection comes from a forward-zone that forwards queries to a resolver supporting DoT. DNSSEC[3] works through verification, not encryption: it checks cryptographic signatures but leaves the traffic unencrypted, and per the October 2026 Defaults.Exposed census only 7.03% of graded domains have a valid, fully validating DNSSEC chain; a tampered response that fails validation makes the resolver return SERVFAIL instead of the bogus IP. DoT and DoH are not tamper-free either, since you are still trusting whoever runs the resolver. Even with encrypted DNS, the ISP can see the hostname in the TLS handshake through SNI[4] and can sometimes tell the site from the destination IP alone; the author tunnels traffic through Mullvad using a Tailscale exit node, which only shifts some of the trust to the VPN provider.

In the author's setup, AdGuard is the primary DNS while dnscrypt-proxy sends upstream queries over DNSCrypt, so DNS traffic is encrypted in transit; for containers where a DNS outage cannot be tolerated, Cloudflare is configured as a fallback, though local AdGuard remains their primary. The author has used Pi-hole/AdGuard for over 3 years, runs NixOS on the servers and publishes the dotfiles as open source.

Read the original karthihegde.devDiscussion

Sources

Published: First seen: Читать по-русски

Open as a page