GCP Associate Cloud Engineer Practice Question 22: Cloud NAT Private VMs
Google Cloud Associate Cloud Engineer · Test 3 · question 2 of 10
VMs in a private subnet have no external IP addresses. They must download operating system patches from a third party repository on the internet, but nothing on the internet should be able to initiate a connection to them.
What should you configure?
Show answer and explanation
Answer:
Cloud NAT provides outbound network address translation for VMs that have no external IP addresses. It only allows replies to connections that the VMs initiate, so the instances can reach the internet while remaining unreachable from it. It is configured on a Cloud Router in the region.
Option B works technically, but assigning external IP addresses is what you want to avoid, and it increases the attack surface and cost. Option C only enables access to Google APIs and services, not to arbitrary third party sites. Option D is not possible with a third party internet repository, which is not a VPC network you can peer with.
Reference: Cloud NAT overview