Route 53 Resolver DNS Firewall is the filter on DNS queries that the VPC resolver actually handles. A rule group associated with the VPC lets you allow, alert, or block names, using a domain list you write or a list AWS manages. Queries that never arrive at that resolver are outside the filter. A laptop pointed at a public resolver, a pod whose CoreDNS forwards straight to a public address, and a DHCP option set that hands out something other than the VPC resolver all produce that bypass. The rule group can be perfect and the query still leaves.
Rutagon associates the rule groups after the resolver path is the path workloads use. Turning the feature on in a VPC that is not the resolver for its instances creates a control that looks enabled in the console and is absent on the wire. AWS describes the evaluation order in How Resolver DNS Firewall works.
Where Route 53 Resolver DNS Firewall sits in the VPC
The resolver in the VPC is the filter point. Queries from instances that use AmazonProvidedDNS reach it. Queries that arrive through a Resolver inbound endpoint are resolver queries too, and they are in the same filtering path when the endpoint hands them to the VPC resolver. Queries sent to an address that is not the resolver skip the rule groups entirely. The first check in a deployment is the DHCP option set and, on EKS, the CoreDNS forwarding config. If either one sends recursion somewhere else, we fix that path before we tune block lists. Otherwise the block list becomes a report about the workloads that happen to use the default resolver.
A rule group is a named set of rules. Associating it with a VPC turns filtering on for that VPC. Several associations are ordered by priority. DNS Firewall evaluates the lowest numeric priority first. Association priority must be unique per VPC and, in the API, falls between 100 and 9900. We leave gaps, 101 then 201, so a later group can be inserted without renumbering. Inside a group, rules also run from the lowest priority upward, and the first match wins. An allow rule that sits at a lower number than a block rule will allow a name that the block list also contains. Priority is the policy. The list contents are not.
Each rule points at a domain list or at a DNS Firewall Advanced protection, and it has an action: ALLOW, ALERT, or BLOCK. ALLOW is for domain-list rules. ALERT lets the query through and records it. BLOCK stops it and requires a block response: NODATA, NXDOMAIN, or OVERRIDE. OVERRIDE returns a record you specify. That record has to resolve to something you meant, or you have replaced a sinkhole with a broken name. We use ALERT on a new managed list for a period of real traffic, then change the action to BLOCK when the false positives have an allow rule in front of them. The change from alert to block is a reviewed change, because it is the moment the control starts causing outages.
aws route53resolver associate-firewall-rule-group \
--name prod-threat-lists \
--firewall-rule-group-id "$RULE_GROUP_ID" \
--vpc-id "$VPC_ID" \
--priority 101 AWS-managed domain lists, including the aggregate threat list, are the usual first block or alert rule. A custom list is how a vendor name that the managed list flags gets an explicit allow, at a priority number lower than the block. Writing the vendor into a shared "temporary allows" list with no owner is how the allow list becomes the real policy. Each allow entry has a ticket and an expiry we actually honor.
CNAME chains need a decision. The domain redirection setting either inspects every name in the chain or trusts the names after the first. Inspecting the chain means each name the chain can land on has to be in a list with the action you intend. Trusting the rest means a blocked name can still be reached if the first lookup was allowed and the chain walks off the list. We inspect the chain on threat rules. We trust redirection only for a list where the operational cost of listing every target is higher than the risk, and we write that down.
Fail open, logs, and the evidence
The VPC's firewall configuration decides what happens when DNS Firewall does not answer. The default is fail closed: the resolver returns SERVFAIL for queries it could not have filtered. That favors the control over availability. FirewallFailOpen set to enabled lets queries through when the firewall does not answer, which favors availability. AWS documents both in DNS Firewall VPC configuration. A production VPC that is the DNS path for customer traffic gets an explicit choice, recorded with the association. We do not leave the default in place by accident and discover it during a firewall impairment as a regional outage. We also do not enable fail open on a VPC whose purpose is to keep workload DNS inside a block list, and then describe the control as strict.
Query logging is a second association. The rule group filters. The query log records the query, the VPC, and the firewall action when the firewall evaluated the query. Metrics show volume. They do not show which instance asked for which name. An examiner who wants evidence of egress control will ask for a blocked name and the log line. We attach the log to the destination the account already uses for evidence, with a retention period that covers the exam window. Flow logs are the network cousin of this record, covered in VPC flow logs for SOC 2. They do not contain the DNS name. The query log does. Security groups still constrain which addresses a packet can reach, which is a different layer, covered in VPC security groups. A block on DNS and a wide-open egress CIDR on port 53 to the public internet is a split policy. The public resolver path is the bypass. Close it, or stop claiming the firewall sees everything.
Organization sharing of rule groups, through Resource Access Manager, is how a security account owns the lists and member VPCs associate them. A local rule group in a member account with a higher-priority allow can sit in front of the shared block. We review association priority across the VPC, not only the contents of the shared group. The shared group is the baseline. The local group is an exception register.
This is AWS cloud infrastructure work with a compliance outcome: the path, the priority, the fail mode, and the log. Rutagon has put that set on client VPCs and on the VPCs that serve a production SaaS platform. The platform's pods use the VPC resolver. The firewall is associated there. A debug pod with a public resolver in its config is a finding, because it is a bypass with a deployment manifest.
What we turn on first
One VPC that already uses the VPC resolver. One rule group. An AWS-managed threat list set to ALERT. Query logging on. A week of log review, an allow list for the names the business actually needs, then BLOCK on the threat list. Fail mode chosen and written down. Then the next VPC. A rollout that blocks on day one in every VPC produces a production incident and a request to delete the association. The association is the control. Deleting it to restore a build is the failure mode we plan the alert period to avoid.
The evidence pack is the association ids and priorities, the rule actions, the domain lists in use, the fail-open setting per VPC, a sample of blocked queries from the log, and the list of resolvers workloads are configured to use. The last item is the one that proves the bypass is closed. A console screenshot of a rule group, with no log sample and no DHCP or CoreDNS note, shows that filtering is configured. It does not show that queries reach it.
Frequently Asked Questions
Does DNS Firewall see queries sent to a public resolver address?
No. It evaluates queries the VPC resolver handles. A host, a pod, or a DHCP option set that uses a different resolver never presents those queries for filtering. Fix the resolver path before you treat the rule group as coverage. An inbound Resolver endpoint is in scope because those queries are handed to the VPC resolver.
What is the difference between ALERT and BLOCK?
ALERT allows the query and records it. BLOCK stops the query and returns NODATA, NXDOMAIN, or an OVERRIDE record you define. We run a new list as ALERT until the legitimate names have an allow rule at a lower priority number, then we change the action to BLOCK. The first match wins, so an allow at a higher priority number never runs.
What happens when DNS Firewall does not respond?
The VPC configuration decides. The default is fail closed, and the resolver returns SERVFAIL. Enabling FirewallFailOpen lets the query through. Pick one per VPC and keep it in the evidence pack. A silent default becomes an outage or a hole, depending on which way you discover it.
Are query logs part of the rule group association?
They are a separate configuration. The rule group filters. The query log is what shows the name, the source, and the firewall action. Metrics alone cannot answer which workload looked up a blocked name. Retention has to cover the period an examiner will sample.
Talk to us about DNS Firewall on your VPCs. Contact Rutagon at rutagon.com/contact, 907-841-8407, or contact@rutagon.com.