I'm trying to fix this issue for the past 2 days but I don't know how to resolve it. I wanted to capture the client IP on the application with traefik proxy.
R53 --> ALB --> (Traefik proxy --> applocation) ECS
I'm running my application on ECS and leveraging ECS provider.
What I have tried :
Adding the below labels to the traefik as per the documents:
--entrypoints.http.forwardedheaders.trustedips=0.0.0.0/0 --entrypoints.https.forwardedheaders.trustedips=0.0.0.0/0 --entrypoints.http.forwardedheaders.insecure=true --entrypoints.https.forwardedheaders.insecure=true
Tried all of them together and individually also but every time I add these configurations traefik stopped working without any useful logs.
What I observed:
Without adding any of these configurations if I hit the trafik IP directly by skipping the Loadbalancer I can see My IP (client-IP). does it mean i need to make changes in the AWS-ALB ?
Upgrade-Insecure-Requests: 1 X-Amzn-Trace-Id: Root=1-620e68b5-121181407c9ceadf6c8f0a25 X-Forwarded-For: 172.31.22.81 X-Forwarded-Host: infra.**********.nl X-Forwarded-Port: 80 X-Forwarded-Proto: http X-Forwarded-Server: ip-172-31-8-140.eu-central-1.compute.internal X-Real-Ip: 172.31.22.81
Directly IP HIT:
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 Upgrade-Insecure-Requests: 1 X-Forwarded-For: 80.***.***.61 X-Forwarded-Host: 184.108.40.206 X-Forwarded-Port: 80 X-Forwarded-Proto: http X-Forwarded-Server: ip-172-31-8-140.eu-central-1.compute.internal X-Real-Ip: 80.***.***.61