Skip to content

Lesson 9 of 9 · 25m

Defensive DNS Configuration and Monitoring

A practical defense-in-depth checklist: registry controls, zone hygiene, CAA, TTL strategy, monitoring, alerts, and decommissioning discipline.

Good DNS defense is unglamorous. It is a set of controls that assume people will forget things, vendors will change behavior, and migrations will be abandoned halfway through. Your job is to make those failures visible before someone else claims the infrastructure you left behind.

Lock the control planes

  • Registrar: hardware-key MFA, transfer lock, registry lock for critical domains, renewal monitoring.
  • DNS provider: SSO, scoped API tokens, audit logging, alert on nameserver and zone-transfer changes.
  • Cloud/SaaS: custom hostname ownership verification, inventory of resources accepting hostnames.
  • Certificate issuance: monitor Certificate Transparency for unexpected names and issuers.

Zone hygiene rules

1. No DNS record without an owner.
2. No temporary record without an expiry date.
3. No decommissioned service until its DNS reference is removed.
4. No wildcard unless there is a documented operational reason.
5. No broad CNAME trust in OAuth, CORS, CSP, or cookie scope.

A zone export should be small enough to review. If nobody can explain a record during review, that record is not harmless — it is unowned attack surface.

Use CAA to narrow certificate issuance

dig acme-corp.com CAA +short

A typical policy might be:

acme-corp.com. IN CAA 0 issue "letsencrypt.org"
acme-corp.com. IN CAA 0 issuewild ";"
acme-corp.com. IN CAA 0 iodef "mailto:security@acme-corp.com"

CAA does not stop every attack, but it reduces which certificate authorities can issue for your names and gives you another tripwire when paired with CT monitoring.

Monitor for the changes that matter

- new or changed NS records at registrar and zone levels
- CNAME targets leaving your known-provider list
- records pointing at provider namespaces without matching active resources
- sudden TTL drops before unexplained record changes
- CT certificates for hostnames nobody recognizes
- orphaned cloud IPs still referenced by A/AAAA records

Diff zone exports daily. Feed cloud inventories into the same comparison. The alert that matters is not 'record exists' but 'record refers to an asset we can no longer prove we own.'

TTL strategy is operational, not superstition

Long TTLs reduce lookup cost and withstand provider outages. Short TTLs speed migrations and incident response. Use long TTLs for stable records, lower them before planned changes, then raise them again after validation. Do not keep everything at 30 seconds forever; resolvers and middleware often cap or ignore extreme values.

Field notes

  • The best anti-takeover control is a decommissioning checklist that removes DNS before deleting infrastructure.
  • Keep a break-glass registrar path documented and tested; MFA lockouts during incidents are real.
  • Alert fatigue kills DNS monitoring. Start with high-confidence orphan and delegation-change alerts.
  • Run tabletop exercises: 'marketing deleted the SaaS site but left DNS live' should have a known owner and a known fix path.

Was this lesson helpful?

Sign in to rate