Course contentsShow
← Security
Lesson 1833 of 3,05237. Cloud Security - Network ArchitectureFree lesson

Egress-Only Internet Gateways for IPv6

Using egress-only gateways to provide outbound IPv6 connectivity while blocking inbound traffic.

Egress-Only Internet Gateways for IPv6

What you'll learn: How to allow IPv6 instances to initiate outbound internet connections while automatically blocking all inbound traffic.

The IPv6 Challenge

Unlike IPv4 where private subnets use NAT gateways for outbound-only internet access, IPv6 addresses are globally unique and routable by design. This means every IPv6 instance can be directly reachable from the internet—a significant security concern. You need a way to let your instances reach the internet without exposing them to inbound connections.

What Is an Egress-Only Internet Gateway?

An egress-only internet gateway is a stateful IPv6 component that allows outbound traffic from your VPC to the internet while preventing the internet from initiating connections to your instances. Think of it as a one-way door: your instances can push the door open to go out, and responses can come back through the same session, but outsiders cannot push the door open from the other side.

This is the IPv6 equivalent of the NAT gateway behavior you learned about for IPv4, but with a key difference: it doesn't perform address translation since IPv6 addresses remain unchanged.

How It Works

  1. Attach an egress-only internet gateway to your VPC
  2. Update your route table to direct IPv6 internet-bound traffic (::/0) to the egress-only gateway
  3. The gateway tracks outbound connections and allows return traffic
  4. All unsolicited inbound connection attempts are automatically dropped

This maintains the stateful filtering you've seen with security groups—established connections work bidirectionally, but new inbound connections are blocked.

Key Takeaway: Egress-only internet gateways provide secure outbound IPv6 connectivity by allowing instances to initiate internet connections while blocking all inbound traffic, giving you NAT-like protection without address translation.