具有静态IP地址的AWS Load Balancer [英] AWS Load Balancer with a static IP address

本文介绍了具有静态IP地址的AWS Load Balancer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Amazon云上运行了一个设置,并通过负载均衡器运行了两个EC2实例.

I have a set-up running on Amazon cloud with a couple of EC2 Instances running through a load balancer.

重要的是,该站点具有唯一的(静态)IP或一组IP,因为我要插入第三方API,这些API仅接受来自已添加到其白名单中的IP发出的请求.

It is important that the site has a unique(static) IP or set of IPs as I'm plugging in 3rd party APIs which only accept requests made from IPs which have been added to their whitelist.

因此,基本上,除非我们可以为这些第三方提供静态IP或IP范围,否则站点的请求将始终来自该IP,那么我们将无法对其进行任何呼叫.

So basically unless we can give these 3rd parties a static IP or range of IPs that the requests from the site will always come from then we would be unable to make any calls to them.

有人知道弹性IP与负载均衡器不兼容吗?

Anyone knows how to achieve this as I know that Elastic IPs are not compatible with load balancers?

如果我要查找负载均衡器DNS名称的IP(例如,dualstack.awseb-BAMobile-ENV-xxxxxxxxx.eu-west-1.elb.amazonaws.com解析为200.200.200.200),该IP是否为静态的?

If I were to look up the IP of the load balancer DNS name (e.g. dualstack.awseb-BAMobile-ENV-xxxxxxxxx.eu-west-1.elb.amazonaws.com resolves to 200.200.200.200) would that IP be Static?

任何帮助/建议都非常感谢.

Any help/advise is greatly appreciated guys.

推荐答案

您的负载均衡器的IP地址不是静态的.无论如何,您的传入负载平衡器IP不会用于传出连接.

The ip addresses of your load balancer is not static. In any event, your incoming load balancer IP wouldn't be used for outgoing connections.

您可以为负载均衡器后面的实际实例分配弹性IP,然后将其用于传出请求.您将获得5个免费的弹性ips,我相信您可以根据需要申请更多的弹性ips.

You could assign elastic IPs to the actual instances behind the load balancer, which would then be used for outgoing requests. You get 5 free elastic ips, and I believe you can apply for more if you need them.

此外,如果使用VPC,并且您的实例位于私有子网中,则它们只能通过您设置的NAT实例访问Internet,并且您当然可以为NAT实例分配弹性IP

Additionally if using a VPC and if your instances are in a private subnet then they will only be able to access the internet via the NAT instance(s) you setup, and you can of course assign an elastic IP to the NAT instances

这篇关于具有静态IP地址的AWS Load Balancer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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