Forum Discussion
how to get access to x-forwarded-for client IP address via IIS6 ASP code?
So have a variation of the age-old problem where IIS webservers are behind F5 BIGIPs with SNAT enabled. Some of our webservers are behind a LTM with x-forwarded-for header inserts and SNAT enabled. The webservers are IIS6 32-bit systems. Our ASP application requires the client source IP address in order to submit the IP to 3rd party credit card processors for their fraud detection filters.
Problem is that the client IP address (remote_host) in the X-FORWARDED-FOR header (with using the F5 IIS X-Forwarded-For ISAPI Log Filter) only works for W3C logs and not for IIS ASP applications to extract the original client IP. Took a look at the 3rd aprty ARR Helper module but that is only for IIS7.
Anyone else have any suggestions for a method for IIS6 ASP code to be able to get the original client (remote) IP address?
thx in advance.
Will
1 Reply
- Kevin_Stewart
Employee
This works in ASP.NET 2.0:Response.Write(Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
