Egress-Only Internet Gateway
What you'll learn: How to enable IPv6 instances to access the internet while blocking all incoming connections from the internet.
What is an Egress-Only Internet Gateway?
An Egress-Only Internet Gateway is a special gateway designed specifically for IPv6 traffic. It allows instances in your virtual network to initiate outbound connections to the internet (egress) while preventing the internet from initiating inbound connections to those instances (ingress).
Think of it like a one-way door at a secure facility: employees can exit freely to get coffee, but random people from outside can't walk in.
Why Do We Need This for IPv6?
Remember NAT Gateways from earlier lessons? They served dual purposes for IPv4:
- Translated private IPs to public IPs
- Blocked unwanted inbound traffic
With IPv6, all addresses are globally unique and routable — there's no concept of "private" IPv6 addresses like RFC 1918 for IPv4. This means your instances could be directly reachable from the internet, which creates a security concern.
The Egress-Only Internet Gateway solves this by providing stateful filtering: it remembers outbound connections and allows only the response traffic back in, blocking everything else.
Common Use Cases
- Updating software packages from the internet
- Accessing external APIs or services
- Downloading patches and security updates
- Any scenario where instances need internet access but shouldn't accept incoming requests
Key Takeaway: Egress-Only Internet Gateways provide IPv6 instances with secure outbound internet access while maintaining network security by blocking unsolicited inbound connections — essentially combining the protective benefits of NAT with IPv6's global addressing.