Lab: 53 Nat gateway testing - TanveeKhanDB/OCI GitHub Wiki
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:
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.
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:
Public instance:
1. Step : Login vai putty to public instance Hub_public_instance:
2. Step : Ping Meesho_pvt_instance to validate DRG connectivity:
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
4.Step: Login to Meesho_pvt_instance with the help of ssh key.
ssh -i ~/.ssh/key.pem [email protected]
5. Step: Configuring the NAT gatways as Meesho_NAT in spoke VCN
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
7. Step: Validating the downloded softwares:
rpm -q telnet
rpm -q httpd