简体   繁体   English

无法从 Amazon EC2 实例 linux box 连接到互联网

[英]Not able to connect to internet from Amazon EC2 instance linux box

In the amazon EC2 instance, i have set the set the inbound/outbound of security group to MY-IP address.在亚马逊 EC2 实例中,我已将安全组的入站/出站设置为 MY-IP 地址。

When i try to install the mysql client or some other software, its saying connection timeout.当我尝试安装 mysql 客户端或其他一些软件时,它说连接超时。

But when i make the inbound/outbound to anywhere ie 0.0.0.0/00, then i am able to install the software.但是当我将入站/出站发送到任何地方,即 0.0.0.0/00,然后我就可以安装该软件。

But i don't want to expose the EC2 instance requests to everyone.但我不想向所有人公开 EC2 实例请求。

How to connect to Internet and install the software with restricted security groups.如何连接到 Internet 并安装具有受限安全组的软件。 Please can u help out on this.请你帮忙解决这个问题。

To be able to access Internet freely, you should allow outgoing network traffic.为了能够自由访问 Internet,您应该允许传出网络流量。

To do so, create an outbound rule for all traffic to 0.0.0.0/0 in your EC2 Security Group.为此,请为 EC2 安全组中到0.0.0.0/0 all traffic创建outbound rule This is a default setting with EC2 and it shouldn't be a security concern.这是 EC2 的默认设置,不应成为安全问题。

In Security group, Set the outbound traffic to the below在安全组中,将出站流量设置为以下

Protocol      Port Range  Source  
All Traffic   All  All    0.0.0.0/0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM