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

gefragt vor einem Jahr351 Aufrufe
1 Antwort
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.

EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen