Amazon ELB not Passing "X-Forwarded-For" to IIS

5,149

It sounds like you're using Layer 4 instead of layer 7. Change the front-end protocol (called 'load balancer protocol' in the console settings) from SSL(Secure TCP) to HTTPS (Secure HTTP).

Share:
5,149

Related videos on Youtube

Chad Decker
Author by

Chad Decker

Updated on September 18, 2022

Comments

  • Chad Decker
    Chad Decker over 1 year

    ELB is setup to accept public HTTPS (443) connections and send them on as HTTP (80) to the EC2 instances.

    The EC2 instances run an IIS app that needs to know the user's IP address. According to everything I've read on this site and elsewhere, ELB is supposed to stash that information in a header named "X-Forwarded-For". For whatever reason, ELB doesn't seem to be passing that particular header to IIS (or IIS is stripping it out?).

    Any idea what I could be doing wrong?

  • Chad Decker
    Chad Decker about 11 years
    Sure enough, that did it. Thanks. I wouldn't have thought to look there.