I have created a new EC2 instance using terraform for installing vertica, but not able to access Internet or ping google.com within the instance.
I have set up an ec2 instance with a private subnet and have set up nat gateway with a public subnet.
The main route table allows 0.0.0.0/0 as destination and target as the nat gateway.The other route table has the subnet association as the private subnet 10.103.2.0/24. The internet gateway is also attached to the vpc.
My security group for the ec2 instance allows traffic for Redshift and ssh for the following destinations: 10.83.0.0/16,10.100.0.0/16 and outbound all traffic: 10.83.0.0/16,10.100.0.0/16
My Questions:
- Should any route table have internet gateway as the target?
- Should the security group also allow icmp?
- Please brief me how I should troubleshoot and what I should check?
Most likely you haven't defined any internet gateways for your VPC