travisghansen / kubernetes-pfsense-controller

Integrate Kubernetes and pfSense
Apache License 2.0
197 stars 22 forks source link

X-Forwarded-For & X-Real-IP #18

Closed andruwa13 closed 2 years ago

andruwa13 commented 2 years ago

Add X-Real-IP & X-Forwarded-For are the private ip addr of the ingress controller.

travisghansen commented 2 years ago

Welcome! Also, huh? I have no idea what you’re asking.

andruwa13 commented 2 years ago

@travisghansen In the nginx logs internal IP, but I need to have a real IP

travisghansen commented 2 years ago

You’re terminating on haproxy on pfsense and then using this project to create shared frontends to forward to your ingress controller?

andruwa13 commented 2 years ago

yes

travisghansen commented 2 years ago

Just check use forwardfor in the advanced settings for the frontend. You can optionally put something like this in the advanced pass thru in that same section:

http-request set-header X-Forwarded-Ssl on if { ssl_fc }
http-request set-header X-Forwarded-Port %[dst_port]
http-request set-header X-Real-Ip %[src]
andruwa13 commented 2 years ago

not work(

travisghansen commented 2 years ago

This really isn’t managed by this project. Sorry :(