[英]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。
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.