Adding X-Forwarded-For in IIS 7
Hostname shows the same IP address for all Visitors in the SightMax Operator Console. This can happen if you are using a F5 load balancer, or if you are using an Anti DDos service that filters your website traffic. These instructions are for the website hosting the SightMax virtual directories.
This article describes how to enable the X-Forwarded-For logging in IIS 7 on Windows Server 2008 servers. This is useful for administrators who need to log the source IP address of client machines if NAT is setup on the firewall. This applies to Cloud and Dedicated solutions.
- Download the ISAPI filter from http://devcentral.f5.com/weblogs/joe/archive/2005/09/23/1492.aspx (click the Codeshare link)
- Extract it to C:\windows
- Open IIS Manger, left click instance name
- Select ISAPI filters on right under IIS section
- Click ‘Add’ at the top right
- In the Executable section, browse to C:\Windows\F5XForwardedFor\F5XForwardedFor2008\x64\Release for 64-bit OS and C:\Windows\F5XForwardedFor\F5XForwardedFor2008\x86\Release for 32-bit OS. Choose F5XForwardedFor.dll, and click Open
- Enter “XForward” in the Filter name
- Click OK
Verify the site you need this setup for, has the newly added ISAPI filter setup under their ISAPI Filters module as well.
You can test that it works by sending traffic to the website externally, and checking the logs of that site to see the X-Forwarded-For header is in the log.