
Cloud NAT lets VMs that have only internal IP addresses start outbound connections to the internet and receive the replies to those connections. It does not allow new inbound connections from the internet. Outbound access without inbound exposure is the whole purpose of the service, and it also works where an organization policy forbids external IP addresses on VMs. For the Professional Cloud Network Engineer exam, the useful questions about Cloud NAT are where a gateway applies, which gateway type fits, and why a particular packet is or is not translated.
A Cloud NAT gateway is a regional resource that runs on a Cloud Router, and it can only translate traffic from subnets in its own region. A VPC network with workloads in several regions therefore needs a Cloud Router and a NAT gateway in each of those regions. Setting a gateway to cover all subnet ranges means all ranges in its own region, and global dynamic routing does not extend that scope.
Cloud NAT and firewall rules do different jobs. VPC networks already include an implied allow egress rule, so outbound traffic is permitted by default. What a VM without an external address lacks is an address that the internet can reply to, and that is the part Cloud NAT provides. An egress allow rule, however broad, does not supply one.
The Public NAT gateway type translates internet-bound traffic using external IP addresses. It does not touch traffic sent to on-premises over Cloud Interconnect. It also only translates traffic that starts from resources inside the VPC network, so it cannot give on-premises servers a path to anything, whether that is the internet or Google APIs. A Private NAT gateway translates traffic to internal destinations instead, using addresses from a dedicated Private NAT subnet.
The gateway type also affects access to Google APIs. When a Public NAT gateway applies to a subnet's IP range, Google Cloud automatically enables Private Google Access for that range, so traffic to Google APIs such as Cloud Storage and BigQuery keeps working. A Private NAT gateway does not do this.
Two conditions must hold before a Public NAT gateway translates a packet, and checking both is the quickest way to explain traffic that is not being translated.
The network interface has no external IP address. Public NAT only translates traffic from VM network interfaces that have no external IP. If an interface has its own external IPv4 address, outbound internet traffic from that interface uses that address directly and bypasses the gateway, so that traffic does not leave from any of the gateway's NAT addresses. Removing the external IP from the interface puts its traffic back behind the gateway.
The routing table sends the packet to the default internet gateway. Cloud NAT only handles packets that VPC routing sends toward the default internet gateway. When the default route points somewhere else, such as a VPN tunnel back to on-premises, internet-bound packets never reach the internet gateway and the NAT gateway never sees them. Instances that should use NAT need a route to the default internet gateway that wins over the other default route. In Google Cloud routing a lower priority number wins, and a network tag can limit such a route to only the instances that should use it.
The external IP rule applies to GKE nodes as well. Cloud NAT does not translate traffic from the primary internal address of a node interface that has an external IP. It can still translate traffic from alias IP ranges on that node, which is where Pod IP addresses come from.
Whether Pod traffic keeps its Pod IP depends on the ip-masq-agent. By default, the agent rewrites the source of Pod traffic to the node's IP address for any destination that is not listed in its nonMasqueradeCIDRs list. On a node with an external IP, that masqueraded traffic uses the node's external address and never reaches Cloud NAT. Destinations listed in nonMasqueradeCIDRs are the exception, because Pod packets to them keep the Pod IP from the alias IP range as their source, and Cloud NAT can translate traffic from alias IP ranges.
Only the two conditions above decide whether a packet is translated. Other settings near Cloud NAT act on something else. A load balancer shapes how inbound requests reach a VM, while the VM's own outbound connections still use Cloud NAT. Routes for internal ranges, such as RFC 1918 destinations reached through a VPN tunnel, leave internet-bound traffic on its default route. Firewall rules decide whether traffic is allowed or denied, not which route it follows, and firewall priority is unrelated to route priority. Port allocation, idle timeouts and extra NAT IP addresses deal with capacity and connection lifetime rather than routing. Cloud NAT rules select NAT addresses based on destination, and they do not decide whether NAT applies.
For IPv6, NAT64 in Cloud NAT lets IPv6-only VMs start outbound connections to IPv4 destinations. It works in that outbound direction only, so it does not let outside IPv6 clients reach IPv4 servers.
When working through a Cloud NAT scenario on the Professional Cloud Network Engineer exam, check that every region with workloads has its own Cloud Router and gateway, that the gateway type matches the destination (internet or internal), and that the traffic in question comes from an interface without an external IP and follows a route to the default internet gateway. Capacity settings such as port allocation and extra NAT IP addresses only matter once traffic is actually reaching the gateway.
Our Professional Cloud Network Engineer practice exams cover Cloud NAT alongside Private Google Access and hybrid routing, with detailed explanations that drill these distinctions.