aws elb 负载均衡如何获取用户真实 ip

58 天前
 awanganddong

公司项目最近新加了一个 elb,但是在 elb 之前还有一个 nginx ,这样导致 elb 获取的 ip 属于 nginx 的 ip 。 怎么才能让 elb 获取的客户端 ip 是客户端的真实 ip ?

1442 次点击
所在节点    Amazon Web Services
9 条回复
K2K2
58 天前
X-Forwarded-For 参考链接: https://blog.bitipcman.com/eks-elb-get-real-ip/
K2K2
58 天前
awanganddong
58 天前
我看了这些帖子和我要的感觉不太一样。最主要问题在于我在 elb 之前又加了一个 nginx 当作负载均衡。
enchilada2020
58 天前
awanganddong
58 天前
公司之前买的 https 证书是从小公司来的,我导入 aws 之后,https ios 不能用。要改中间证书,比较麻烦
ninion
58 天前
aws elb 产品线有多个 lb 产品,如果使用的是 alb 或者 clb 可以直接用 X-Forwarded-For 捕获 Client IP ,如果使用的是 nlb 需要在目标组参数中开启 Client IP preservation
daimaosix
58 天前
是 Global 还是 CN ?
clhlc
58 天前
@awanganddong 证书用 aws 的 acm
awanganddong
57 天前
我还是直接用回 aws ,不然太麻烦。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1059038

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX