nodemethod
ConnectivityIntermediate

Centralised egress with inspection

All outbound internet traffic leaves through one inspected exit, with domain allow-lists and logging.

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.

EGRESS VPCNETSpoke: proddefault → hubNETSpoke: devdefault → hubHUBTransit gateway0.0.0.0/0 → egressSECNetwork firewalldomain allow-listGWNAT gatewaysfixed public IPsGWInternet gatewayWWWInternetapproved domains
traffictunnel / replicationblocked

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

  1. Spoke VPCs have no internet gateway. Their default route points to the transit hub.
  2. The hub sends 0.0.0.0/0 to the egress VPC attachment.
  3. A firewall inspects TLS SNI and HTTP Host headers and only allows listed domains.
  4. 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;)

Examples are starting points. Review provider limits, names and versions for your environment before applying.

What to monitor

SignalWhy it matters
Dropped flows by destinationSeparates a missing allow-list entry from a real exfiltration attempt.
NAT active connections and port errorsCentral NAT carries every spoke, so exhaustion has wide impact.
Firewall throughput and latencyThe firewall is now in the path of every outbound call.
New destinations per workloadA 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.

Checklist

0 of 6 done
Was this pattern useful?

Run this pattern with NodeMethod watching it.

NodeMethod is onboarding early-access teams now. Tell us about your environment and we will be in touch.

esc
↑↓ to move↵ to open