Instead of a NAT gateway in every VPC, spokes send default-route traffic to a dedicated egress VPC through the transit hub. There a firewall filters by domain and protocol before NAT translates the traffic to a small set of public addresses. This gives one place to log, one set of IPs for partners to allow-list, and one control point to stop data leaving.
- Detect
- Analyze
- Resolve
When to use it
- Regulated workloads that must log all outbound connections
- Partners that allow-list your source IPs
- Blocking command-and-control and data exfiltration
When to avoid it
- Very high outbound volume where hub processing cost outweighs the control
- Single-VPC estates, where a local firewall is simpler
How traffic flows
- Spoke VPCs have no internet gateway. Their default route points to the transit hub.
- The hub sends 0.0.0.0/0 to the egress VPC attachment.
- A firewall inspects TLS SNI and HTTP Host headers and only allows listed domains.
- NAT gateways translate allowed traffic to a fixed set of elastic IPs. Return routes for spoke ranges point back to the hub.
Configuration examples
# Allow-list outbound TLS by server name; drop everything else
pass tls $HOME_NET any -> $EXTERNAL_NET 443 (tls.sni; content:"api.stripe.com"; endswith; msg:"payments"; sid:100001; rev:1;)
pass tls $HOME_NET any -> $EXTERNAL_NET 443 (tls.sni; dotprefix; content:".amazonaws.com"; endswith; msg:"aws apis"; sid:100002; rev:1;)
pass tls $HOME_NET any -> $EXTERNAL_NET 443 (tls.sni; content:"registry.npmjs.org"; endswith; msg:"packages"; sid:100003; rev:1;)
drop tls $HOME_NET any -> $EXTERNAL_NET any (msg:"tls not on allow-list"; flow:to_server, established; sid:199999; rev:1;)
drop tcp $HOME_NET any -> $EXTERNAL_NET !443 (msg:"non-tls outbound"; flow:to_server; sid:199998; rev:1;)resource "aws_route" "default_via_hub" {
for_each = toset(module.spoke.private_route_table_ids)
route_table_id = each.value
destination_cidr_block = "0.0.0.0/0"
transit_gateway_id = aws_ec2_transit_gateway.hub.id
}Examples are starting points. Review provider limits, names and versions for your environment before applying.
What to monitor
| Signal | Why it matters |
|---|---|
| Dropped flows by destination | Separates a missing allow-list entry from a real exfiltration attempt. |
| NAT active connections and port errors | Central NAT carries every spoke, so exhaustion has wide impact. |
| Firewall throughput and latency | The firewall is now in the path of every outbound call. |
| New destinations per workload | A server calling a never-seen domain is worth a look. |
Common failure modes
Allow-list missing a new dependency
A deploy that adds a third-party API fails only in production.
Lens links the deploy to new drops at the firewall and names the blocked domain.
Outbound traffic to a known-bad domain
A compromised package tries to reach its command server.
Sentinel matches the domain to threat intelligence, isolates the workload and notifies the team.