大网数据广告活动
服务器运维问答

Can an AWS Classic Load Balancer redirect traffic from a public ip address to a ec2 instance with only private ips?

· 52CE 我爱测

I have a classic load balancer that has public ip addresses. Do the ec2 instances that it routes traffic to need public ip addresses as well, or will it successfully redirect the traffic to a private ip address? They're all locat…

问题原文

原帖链接 · Some Linux Nerd · CC BY-SA 4.0

I have a classic load balancer that has public ip addresses. Do the ec2 instances that it routes traffic to need public ip addresses as well, or will it successfully redirect the traffic to a private ip address? They're all located in different subnets in the same VPC.

The Classic Load Balancer allowed me to add the instances with only private ip addresses without any sort of complaints or errors.

已采纳解答

原帖链接 · Tim · CC BY-SA 4.0

Your internet facing load balancers need public IP addresses. Your EC2 instances do not require public IP addresses, the ELB can load balance to private IPs. Private IPs sometimes make the traffic a little cheaper than public IPs, but not 100% sure in this situation.

You seem to have already done this, so I'm curious why you didn't just try it and see what happens.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-06-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。