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

質問済み 1年前376ビュー
1回答
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.

エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ