Internal DNS Cache Poisoning That Redirected API Traffic

A misconfigured internal DNS resolver accepted forged responses, causing microservice-to-microservice calls to route to a stale IP for 2 hours.

Overview

An internal DNS resolver left without DNSSEC validation cached a forged record for payments-api.internal, and every service sent payments traffic to a dead IP for 2 hours.

What happened

The shared resolver was a self-hosted BIND instance on EC2. DNSSEC, the extension that lets a resolver check that a DNS answer was signed by the zone that owns it, was turned off during an upgrade and never turned back on. The incident then unfolded in six steps.

  • During an upgrade, DNSSEC validation was disabled 'temporarily'.
  • Nobody re-enabled it.
  • During a network hiccup, BIND sent its queries to a rogue resolver.
  • With validation off, BIND accepted a forged A record for payments-api.internal, with a TTL of 7,200 seconds.
  • The team identified the rogue resolver and blocked it, but the stale record stayed in the cache for 2 more hours.
  • The team cleared it with rndc flush and repointed the A record.

Key concepts

  • DNS cache poisoning
  • DNSSEC
  • DNS TTL
  • Service discovery with health checks

Interview questions

  • How do you design internal service-to-service DNS to minimize the impact of DNS failures or poisoning?

Sign up free to read the full topic

More War Stories topics

Start free on Cariara · Coding problems · System design studio