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

demandé il y a un an376 vues
1 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions