In order to connect to the internet from private instance having private subnet, we can using NAT instances which is in Public subnet,So that we can protect the direct connection from Private EC2 instance.
Follow
Private subnet(Private EC2) <--> Private Route table <--> Public NAT Instances <--> Public Route table --> Internet gateway <--> Internet
Below steps to be done.
+AWS NAT Instance - Create EC2 Instance from AWS AMI image(Public NAT Instances)
+AWS NAT - Disable source destination check
+AWS NAT - Create Private EC2 Instance for testing NAT (Private EC2)
+AWS VPC NAT - Attach Private Route table with NAT instance(Private Route table)
+AWS VPC NAT - Allow ping Protocol in NAT Instance
++ Test the Internet Connection from Private instance via NAT
Connect from Public instance to private instance > Copy the key to private instance using SCP and connect
ssh ec2-user@10.0.35.3 -i NewServer1.pem
ifconfig


After Allowing ICMP Protocol in NAT Ping will work

Follow
Private subnet(Private EC2) <--> Private Route table <--> Public NAT Instances <--> Public Route table --> Internet gateway <--> Internet
Below steps to be done.
+AWS NAT Instance - Create EC2 Instance from AWS AMI image(Public NAT Instances)
+AWS NAT - Disable source destination check
+AWS NAT - Create Private EC2 Instance for testing NAT (Private EC2)
+AWS VPC NAT - Attach Private Route table with NAT instance(Private Route table)
+AWS VPC NAT - Allow ping Protocol in NAT Instance
++ Test the Internet Connection from Private instance via NAT
Connect from Public instance to private instance > Copy the key to private instance using SCP and connect
ssh ec2-user@10.0.35.3 -i NewServer1.pem
ifconfig
After Allowing ICMP Protocol in NAT Ping will work
No comments:
Post a Comment