突然,我的amazon EC2实例开始阻止出站http呼叫。 我尝试做一个curl http://www.google.com,最后出现了一个连接超时错误。 在启用Verbose时,它出现以下错误:
curl -v http://www.google.com
* Rebuilt URL to: http://www.google.com/
* Hostname was NOT found in DNS cache
* Trying 172.217.3.164...
* Trying 2607:f8b0:400e:c04::69...
* Immediate connect fail for 2607:f8b0:400e:c04::69: Network is unreachable
* Trying 2607:f8b0:400e:c04::69...
* Immediate connect fail for 2607:f8b0:400e:c04::69: Network is unreachable
但是,当我尝试使用https进行curl时,它可以正常工作:
curl -v https://www.google.com
* Rebuilt URL to: https://www.google.com/
* Hostname was NOT found in DNS cache
* Trying 172.217.3.164...
* Connected to www.google.com (172.217.3.164) port 443 (#0)
我有另一个具有相同安全组的EC2实例,并且该实例上的所有内容都正常工作。
我错过了什么吗?
答案 0 :(得分:2)
您的失败连接似乎都是IPv6。据我所知,EC2不支持IPv6路由。因此尝试使用它无处可行是有道理的。
我建议您了解如何在操作系统映像中禁用IPv6网络。