Oracle Cloud Infrastructure Compute Instance Internet Gateway

Oracle Cloud Infrastructure Compute Instance Internet Gateway

Question

Which gateway can be used to provide internet access to an Oracle Cloud infrastructure compute instance in a private subnet?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

https://blogs.oracle.com/cloud-infrastructure/access-resources-on-the-public-internet-through-an-oracle-cloud-infrastructure-nat-gateway-v2

If you have an Oracle Cloud Infrastructure (OCI) compute instance that is placed within a private subnet and you need to provide it with internet access, you can use a NAT (Network Address Translation) Gateway.

A NAT Gateway is a managed service offered by OCI that provides a way for resources in private subnets to access the internet. It does this by translating private IP addresses used by resources within the subnet to a public IP address. The public IP address can be used to access the internet and receive responses back, which are then translated back to the original private IP address by the NAT Gateway.

Using a NAT Gateway has some advantages over other gateway options:

  • Security: By placing resources in private subnets, you can restrict inbound access to only those resources that need it, which reduces the attack surface. The NAT Gateway allows these resources to access the internet, without exposing them to the internet.
  • Cost-effective: A NAT Gateway can be shared across multiple private subnets, which can help reduce the cost of providing internet access to resources in private subnets.
  • Simplicity: Configuring a NAT Gateway is relatively simple, and does not require any complex routing configurations.

Therefore, the correct answer to the exam question is B. NAT Gateway. The other options are not suitable for providing internet access to a compute instance in a private subnet:

  • Internet Gateway (A): Provides internet access to resources in public subnets, but not to resources in private subnets.
  • Service Gateway (C): Provides access to Oracle services, but not to the internet.
  • Dynamic Routing Gateway (D): Provides VPN connectivity between on-premises networks and OCI, but does not provide internet access to resources in private subnets.