Skip to content

Lab: 53 Nat gateway testing

TanveeKhanDB edited this page Aug 22, 2026 · 7 revisions

Requierment:

In this lab will show how the private instance under spoke will be able to dowanload requiered softwares from internet without exposing his identity public

Planning:

ChatGPT Image Aug 20, 2026, 12_52_55 PM

What is NAT Gateway:

  • In OCI, a NAT (Network Address Translation) Gateway allows resources in a private subnet to initiate connections to the Internet while keeping their private IP addresses hidden from the Internet.

  • “A NAT Gateway in OCI provides outbound Internet connectivity to resources in private subnets without assigning public IP addresses to those resources. The private subnet route table sends 0.0.0.0/0 traffic to the NAT Gateway, which performs source NAT using its public IP before sending traffic to the Internet.

image

The most important part: Route Table

Destination CIDR: 0.0.0.0/0

Target: NAT Gateway


Steps by step process to Create NAT gateways and downaload the telenet and http in private instance inside Meesho_pvt_instance in Spoke by OCI Console:

Private instance:

image

Public instance:

image

1. Step : Login vai putty to public instance Hub_public_instance:

2. Step : Ping Meesho_pvt_instance to validate DRG connectivity:

image

3. Step: Assinging the private key(.ppk) to Hub_public_instance followed by read write permission:

vi ~/.ssh/key.pem
chmod 600 ~/.ssh/key.pem
image image

4.Step: Login to Meesho_pvt_instance with the help of ssh key.

ssh -i ~/.ssh/key.pem opc@10.0.1.21
image

5. Step: Configuring the NAT gatways as Meesho_NAT in spoke VCN

image

6. Step: Downloading the telent and http in Meesho_pvt_instance by NAT post switching to root level.

Sudo su - root
yum install telnet
yum install httpd
image image

7. Step: Validating the downloded softwares:

 rpm -q telnet
rpm -q httpd
image

8. Stpe: Validation of overall network and flow includes NAT and DRG by Network path Visulizer:

image

9. Validating the flow from Hub to spoke by in bulid service of OCI which is Network path Analyzer:

image image image image image image

Clone this wiki locally