Real IP and Host Header

Could anybody help me on how to pass the real IP address and host header in Traefik please? I have a file provider that proxies connects to my Open Media Vault Control Panel but the logs still report that Traefik's IP address are the one contacting it rather than the IP from the originating source.

Hello @DanW

thanks for using Traefik and asking the question.

I would recommend you to see the following docs:

Then the real IP address should be available in the X-Forwarded header.

If you deploy Traefik on Kubernetes with service type Loadbalancer, the externalTrafficPolicy should be also updated.

Thank you

Hi @jakubhajek thank you so much for your response! So does traffic pass the X-Forwarded header by default and it is just a matter of getting Traefik to trust the forwarded headers then?

Hello @DanW

The header X-Forwarded-for is being passed by default. However, in order to get a real IP address, the trust headers mechanism has to be configured.

For testing purposes, it can be set in insecure mode.

Thank you,