简体   繁体   English

AWS NAT 网关公共 IP 地址,用于将公共子网列入白名单

[英]AWS NAT Gateway Public IP Address for Whitelisting with Public Subnet

I have an EC2 instance in a public subnet and I assigned an EIP to the instance and the IP address is Whitelisted to reach my company's network.我在公共子网中有一个 EC2 实例,我为该实例分配了一个 EIP,并且 IP 地址被列入白名单以访问我公司的网络。 The Instance must have a public IP address but I don't want to use EIP here. Instance 必须有一个公共的 IP 地址,但我不想在这里使用 EIP。 Whenever I restart the server the IP address is changing so I thought If I create a NAT Gateway and arrange the routeing table to use connect my company's network but when I do that I cannot reach the instance.每当我重新启动服务器时,IP 地址都会发生变化,所以我想如果我创建一个 NAT 网关并安排路由表以使用连接我公司的网络,但是当我这样做时,我无法访问该实例。 NAT Gateway for the private network for but is there a way to set a static IP address to reach some places?用于专用网络的 NAT 网关,但有没有办法设置 static IP 地址到达某些地方?

Default settings for the route table路由表的默认设置

在此处输入图像描述

Setting use NAT Gateway by default access did not work设置使用 NAT 网关默认访问无效

在此处输入图像描述

Adding a new route for the company network did not work为公司网络添加新路由不起作用

在此处输入图像描述

To have a static IP address within AWS, you must use an Elastic IP.要在 AWS 中拥有 static IP 地址,您必须使用弹性 IP。 Even if you use a NAT Gateway, it consumes an EIP.即使您使用 NAT 网关,它也会消耗 EIP。

From the docs :文档

You must also specify an Elastic IP address to associate with the NAT gateway when you create it.您还必须在创建 NAT 网关时指定一个弹性 IP 地址以与它关联。

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

相关问题 AWS NAT网关与用于传出Internet连接的公共IP - AWS NAT gateway vs public IP for outgoing internet connections AWS公共子网与为VPC实例分配弹性IP地址 - AWS public subnet vs Assigning elastic IP address to an instance of a VPC 当 su.net 使用 NAT 网关时,如何使用 VM public static IP? - How could I use a VM public static IP when subnet uses an NAT gateway? 公共子网中的 NAT 网关和 EC2 实例能否共享同一个 AWS ElasticIP? - Can a the same AWS ElasticIP be shared by a NAT gateway and an EC2 instance in a public subnet? AWS:SSH 通过 NAT 网关从公共 su.net EC2 实例到私有 su.net EC2 实例没有发生 - AWS : SSH to private subnet EC2 instance from public subnet EC2 instance via NAT GATEWAY is not happening 通过Nat Gateway在专用和公用子网之间传递流量 - pass traffic between private and and public subnet by Nat Gateway AWS API Gateway 和 Lambda 的公共 IP 地址(无 VPC) - Public IP address for AWS API Gateway & Lambda (no VPC) 带有NAT设置的Internet无法访问AWS Public / Private子网 - AWS Public/Private subnet not accessible to internet with NAT setup 如何配置 AWS 应用程序负载均衡器和 NAT 网关以拥有公共 IP - How do I configure AWS Application load balancer and NAT gateway to have the public IP 如何使用 AWS CLI 获取 NAT 网关公共 IP? - How can I get the NAT gateway public IP using the AWS CLI?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM