Skip to content

[Documentation] Clarify DNS allowlisting implementation status #12

@Mossaka

Description

@Mossaka

Priority

Low

Description

The documentation (CLAUDE.md:226-253) extensively describes DNS server allowlisting as a defense against DNS exfiltration, but the actual implementation doesn't restrict DNS queries by destination IP.

Documentation claims

--dns-servers flag restricts DNS queries to trusted DNS server IPs only

Actual behavior

  • CLI accepts --dns-servers flag
  • Container-level: setup-iptables.sh allows DNS to any IP (port 53)
  • Host-level: host-iptables.ts allows DNS to any IP (port 53)
  • DNS server IPs are not used in filtering rules

Actions needed

  1. Update documentation to reflect actual behavior (interim)
  2. Implement DNS IP restriction (see [Security] DNS queries allowed to any IP on port 53 (data exfiltration risk) #9) and then restore docs
  3. Add tests verifying DNS queries to non-allowlisted IPs are blocked

Code locations

  • CLAUDE.md:226-253 - DNS defense documentation
  • src/cli.ts - Parses --dns-servers but doesn't use it for filtering
  • containers/copilot/setup-iptables.sh:29-37 - Generic DNS allow rules
  • src/host-iptables.ts:181-192 - Generic DNS allow rules

Related to

Issue #9 (DNS IP restriction implementation)

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions