仅将一个公用子网添加到VPC,并将NAT网关添加到该公用子网实例,但是我无法使用NAT ip地址访问该实例 [英] Had only one public subnet to VPC, and added NAT gateway to that public subnet instance, but i'm not able access the instance using NAT ip address

查看:168
本文介绍了仅将一个公用子网添加到VPC,并将NAT网关添加到该公用子网实例,但是我无法使用NAT ip地址访问该实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只有一个公共子网到VPC,并且向该公共子网添加了NAT网关,但是我无法使用NAT ip地址访问该实例.

I had only one public subnet to VPC,and added NAT gateway to that public subnet, but i'm not able access the instance using NAT ip address.

@ 1)我可以使用公共IP地址(将icmp添加到安全组)对实例执行ping操作,但是通过使用NAT弹性IP地址,我无法进行ping操作.

@1)I'm able to ping the instance, with public Ip address(added icmp to security group), but by using NAT elastic IP address i'm not able to ping.

@ 2)NAT是否适用于单个公共子网. 我的目标是转换附加到公共子网实例的IP地址.

@2)Does NAT is applicable for single public subnet or not. My goal is to translate the ip address attached to public subnet instance.

推荐答案

我认为您为尝试使用的服务使用了错误的服务.

I believe you are using the wrong service for what you are trying to do.

AWS服务 NAT网关用于将出站流量从专用子网路由到Internet.它不会路由入站请求.

The AWS service NAT Gateway is for routing outbound traffic from a private subnet to the internet. It does not route inbound requests.

这篇关于仅将一个公用子网添加到VPC,并将NAT网关添加到该公用子网实例,但是我无法使用NAT ip地址访问该实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆