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

posta un anno fa376 visualizzazioni
1 Risposta
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.

ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande