Real client IP on Bare Metal? #1062
Replies: 2 comments
-
You can set proxy protocol in EMQX: https://docs.emqx.com/en/enterprise/v5.7.1/hocon/#V-listeners-S-listeners-tcp-S-mqtt_tcp_listener-proxy_protocol Of course, you need make sure your LB / ingress controller support this and have correct config, most of LB / ingress controller supported proxy protocol |
Beta Was this translation helpful? Give feedback.
-
The answer for Kubernetes is fairly trivial, if you're willing to make a sacrifice. Use:
Per "Preserving the client source IP":
So if you're like me and running on bare metal with nothing in front, for a smaller cluster, you can use |
Beta Was this translation helpful? Give feedback.
-
The default setup for the emqx operator uses listenersServiceTemplate of LoadBalancer, which I understand to not support the real client IP. The only suggestions I see here are related to cloud LB services, but I'm running on bare metal. I tried switching to NodePort, which "works" (random port assignment, of course, and I can deal with that).... However the client IP's are still reported to be in Kube local.
Any thoughts/suggestions on how to get real client IP's reported? Or an intermediary service setup that's been seen to work well? Do I need to goto an ingress controller?
Beta Was this translation helpful? Give feedback.
All reactions