阅读背景:

AWS apt上的Ec2实例无法正常工作

来源:互联网 

I have Ec2 instance on AWS with Amazon Ubuntu.

我在AWS上使用Amazon Ubuntu的Ec2实例。

When i try to download any thing, I am unable to do so.

当我尝试下载任何东西时,我无法这样做。

For Ex:

对于Ex:

~# apt-get update

0% [Connecting to ap-southeast-1.ec2.archive.ubuntu.com (103.246.148.161)] [Connecting to security.ubuntu.com (91.189.91.15)

Another Ex will be

另一个Ex将是

~# wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip

--2014-04-09 07:27:17--  https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
Resolving s3.amazonaws.com... 207.171.189.80
Connecting to s3.amazonaws.com|207.171.189.80|:443...

This remains forever.

这仍然是永恒的。

I was able to download files until I created Group and user for AWS Console.

我能够下载文件,直到我为AWS Console创建了Group和user。

Please suggest what can be issues here.

请在此处提出可能存在的问题。

3 个解决方案

#1


36  

You EC2 instances's Security groups is not configured to let it reach internet. You need to have an Outbound rule for all traffic to 0.0.0.0/0. In EC2-Classic, this is already in place and hence you need not worry. However, if this is in VPC, then you need to add this rule.

您的EC2实例的安全组未配置为允许其访问Internet。您需要将所有流量的出站规则指定为0.0.0.0/0。在EC2-Classic中,这已经到位,因此您无需担心。但是,如果这是在VPC中,则需要添加此规则。

Also, Apart from what is said above, could you check whether any iptables rules causing any issue.

另外,除了上面所说的,你能否检查是否有任何iptables规则导致任何问题。

#2


1  

Also make sure that if you want to download anything using wget using HTTPS link .Then add Outbound Rule for HTTPS ( Port 443 ) to 0.0.0.0/0

还要确保如果要使用HTTPS链接使用wget下载任何内容。然后将HTTPS的出站规则(端口443)添加到0.0.0.0/0

#3


0  

adding outbound rule HTTP TCP 80 0.0.0.0/0 work for me.

添加出站规则HTTP TCP 80 0.0.0.0/0为我工作。


分享到: