I am not able to connect to internet in my EC2 Linux instance

0

I have an EC2 Amazon linux instance when I connect to it via browser or via putty, I am not able to connect to the internet. means i am not able to do tasks like: a. sudo apt update b. install any python libraries via pip when I check for internet using ping 8.8.8.8, I only end up getting this -- "PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data."

I couldn't find a solution for it. I followed the steps mentioned here but no use: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html#vpc-igw-internet-access Any help would be greatly appreciated. thanks

asked a year ago365 views
1 Answer
0

How are you reaching your instance via putty? VPN or Direct Connect for example?

If you want the instance to be public then give it a public IP and ensure you have a default route in its subnet route table for 0.0.0.0/0 to the Internet Gateway (this makes it a public subnet). Have your instance's security group allow all outbound traffic. Have your subnet ACLs open as default.

If you want only outbound internet access then out it in a "NAT" subnet with a default route to a NAT Gateway that's in a public subnet.

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions