Forum Discussion

Aniket_129589's avatar
Aniket_129589
Icon for Nimbostratus rankNimbostratus
Jul 09, 2013

Get ClientIP Address Behind LoadBalancer

Hi,

 

I am facing an issue to capture the actual IP address of the customers. The Web application is developed in ASP.NET 2.0 version (IIS version is 6.0) and it is hosted in Windows 2003 server behind the F5 Load Balancer.

 

I have tried to capture the customer IP address through the REMOTE_ADDR server variable, however it is capturing the actual IP address. I have also tried the below server variables and they are not also working either,

 

  • HTTP_X_FORWARDED_FOR
  • HTTP_USER_AGENT
  • HTTP_CLIENT_IP
  • HttpContext.Current.Request.UserHostAddress

I have also tried the solutions mentioned in the link https://devcentral.f5.com/blogs/us/...ws-servers and tried the below steps,

 

1. Downloaded the file and transferred the dll from \x64\Release folder in a new folder of the server C:\ISAPIFilters.

 

2. Right clicked on the IIS and select Properties. Then selected the "ISAPI Filters" tab. From there clicked the "Add" button and entered "F5XForwardedFor" for the Name and the path to the file "c:\ISAPIFilters\F5XForwardedFor.dll" to the Executable field. Clicked Ok.

 

However found that the Status of the Filter is showing as "NOT LOADED" in the IIS.

 

Also to confirm you that I am receiving NULL values in the X-Forwarded-For Server variable.

 

Please advise.

 

Thanks and Regards,

 

Aniket

 

12 Replies