soulbalz / traefik-real-ip

When traefik is deployed behind a load balancer, it should get the real IP from the X-Forwarded-For or Cf-Connecting-Ip (if from Cloudflare) header.
MIT License
37 stars 27 forks source link

Getting Real IPs #4

Open dharmendrakariya opened 3 years ago

dharmendrakariya commented 3 years ago

Hey there, I have setup like below

Cloudflare -> LinodeLB -> Traefik(2.4 in k8s) -> Services

My question is even with the ProxyProtocol and Forwarded Headers flags I am getting very few ips and I guess they are not real client ips. (they might be the cloudflare or some other up head load balancer ips from linode data centres ), now as per your pluging

  1. do I have to enable cloudflare's Client-Real-IP
  2. also I am not having any dynamic config so will it be okay just to modify my static config
  3. also do I have to change my k8s manifest with your given example? or just the static config will work
  4. after these steps can I expect real ips(in very large amount of ips in my access logs)
  5. reason to ask all these is because I am going to implement this in prod

sorry to bother you like this(some may sound silly questions) but hoping the kind response