Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: how to get client real-ip #1166

Closed
hotbaby opened this issue Jul 18, 2022 · 2 comments
Closed

request help: how to get client real-ip #1166

hotbaby opened this issue Jul 18, 2022 · 2 comments
Labels
question Further information is requested

Comments

@hotbaby
Copy link

hotbaby commented Jul 18, 2022

Issue description

要增加IP白名单限制,发现APISIX获取远程客户端的地址为本地网络设备CNI0的地址。

@tao12345666333
Copy link
Member

This is actually a Kubernetes knowledge.
You can set externalTrafficPolicy for apisix-gateway service.

@tao12345666333 tao12345666333 added the question Further information is requested label Jul 18, 2022
@tao12345666333 tao12345666333 changed the title request help: apisix ingress 获取remote_addr是本地网络设备CNI0的地址,应该如何配置,才能获取远端真实的客户端IP地址? request help: how to get client real-ip Jul 18, 2022
@hotbaby
Copy link
Author

hotbaby commented Jul 18, 2022

This is actually a Kubernetes knowledge. You can set externalTrafficPolicy for apisix-gateway service.

谢谢大佬,修改externalTrafficPolicy为Local,解决了。

@hotbaby hotbaby closed this as completed Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants