20 from DNS Exfiltration From an Air-Gapped VPC: No Route Out Is Not No Way Out
The name boundary: a VPC with no route out is closed once its resolver refuses the names it does not need
By Vladimir Mikhalev Docker Captain · CNCF Ambassador · IBM Champion
Blueprint 20 Every VPC carries a resolver that looks up any public name for anything inside it, and whatever a workload writes into that name leaves with the question. The route table never sees it.
The procedure finds that way out first, closes it with names rather than packets, and shows the check the lookup it exists to refuse before anyone trusts it.
- 1
Ask the resolver for a public name from inside the cluster
Run a pod with
nslookup example.comin the cluster's VPC, and ask from the node as well: on EKS both answered. An answer, with no route out and no NAT gateway, is the way out, open. Owner: the platform engineer who owns the VPC. - 2
List what stands between the question and the internet
Read the firewall rule group associations, the fail-open setting and the query log associations for the VPC with
aws route53resolver list-firewall-rule-group-associations,list-firewall-configsandlist-resolver-query-log-config-associations. Empty associations mean nothing filters names and nothing records them. Security groups and network ACLs are the wrong layer: AWS says they cannot filter traffic to or from the resolver. - 3
Allow AWS's names, and refuse the rest with NXDOMAIN
Two domain lists and two rules: the allow list holds AWS's service domain and the VPC's internal zones, and every other name matches a list that holds one wildcard and gets NXDOMAIN, the answer clients stop retrying. Owner: the engineer who owns the VPC's Terraform, with security approving every name added to the allow list.
- 4
Fail closed, and write it down
With fail-open off, a firewall that cannot decide refuses too. It is already AWS's default; writing it in the Terraform turns any change to it into a diff someone reviews.
- 5
Keep a record of every question
Flow logs do not record traffic to the resolver, so Resolver query logging is the only record the VPC can keep that a question was asked. Check its association in the same pass as the firewall's; Route 53 does not charge for the query logs, only their destination does.
- 6
Assert the firewall's shape on every plan
A Terraform test against a mocked provider, with no account and no cost, asserts the refusal is NXDOMAIN for every name, the allow rule comes first, the allow list holds only AWS's and internal names, the association exists and fail-open is off, and one run turns the firewall off as the violation (the tests).
- 7
Plant the ways to undo it
Fail-open turned on, a public zone slipped into the allow list, the association never made: the static check must fail on each (the plants), as in planted violations.
- 8
Keep the violation one input away on the real account
The live run on AWS takes the firewall off by one input, so the lookup it refuses can be shown again whenever someone doubts the check. The account, the switch and the bill follow the bounded cloud run. Owner: the platform team that owns the account's runs.
What shows it works
The runs behind each step.
- The run of 21 October 2026 with the firewall off: a pod and the node resolve example.com, while every address and public resolver tried is refused beside a control that must succeed.
- The run of the same day with the firewall on: sixteen checks of sixteen, the pod and the node refused example.com, AWS's own names still answered, and nothing left behind after the teardown.
- The scheduled runs on the account of 22 October and 26 November 2026: the pod and the node still refused.
- The Verify run of 22 November 2026: every plant shown once and caught, the firewall that answers when it cannot decide, the public zone in the allow list and the firewall never put on the VPC among them.
- Decision record 18: the boundary on AWS, and why the DNS check was shown its violation before it was trusted.
This closes the names, not the endpoints. The S3 gateway endpoint and the interface endpoints keep AWS's default endpoint policy, which grants full access, so a workload holding a credential for another account could still send data to that account's bucket or registry through them. An endpoint policy that names this account's resources is the next step, and it is not tested here.
A diagram that says isolated is a claim; the resolver decides whether the network keeps it.
The long version is the post DNS Exfiltration From an Air-Gapped VPC. AWS, Amazon DNS server, Route 53 Resolver DNS Firewall, Flow log limitations and Route 53 pricing; checked November 2026.