如何获得网络访问AWS VPC?

问题描述 投票:0回答:1

我有一个建立在Centos 7镜像上的非私有AWS VPC,然而我无法进行yum更新。你能帮我排忧解难,如何才能连接到外部网络进行更新和下载?

这里是我目前所看到的。

command:  echo $https_proxy
http://172.2x.xx.xx:8080


command: $ sudo yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64 error was
14: curl#7 - "Failed to connect to 2620:52:3:1:dead:beef:cafe:fed6: Network is unreachable"
 * base: centos.host-engine.com
 * epel: fedora.mirrors.pair.com
 * extras: linux.cc.lehigh.edu
 * updates: centos.mirrors.tds.net
http://centos.s.uw.edu/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:4000:200:4a::38: Network is unreachable"
Trying other mirror.
http://centos.host-engine.com/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2001:49f0:d064:5::2: Network is unreachable"
Trying other mirror.
http://mirror.centos.iad1.serverforge.org/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.centos.iad1.serverforge.org/7.7.1908/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.mobap.edu/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirror.mobap.edu:80; Operation now in progress"
Trying other mirror.
amazon-web-services networking
1个回答
0
投票

私有VPC无法上网。

要启用互联网访问需要设置 网关 并将其中一个子网公开。该子网中的实例将能够访问互联网,并且可以从互联网上访问。

如果你的实例在一个私有子网中,你希望你的实例可以访问互联网,但不能从互联网上访问,那么必须在你的子网中设置 NAT网关或NAT实例.

© www.soinside.com 2019 - 2024. All rights reserved.