We have a web filter/load balancer that directs traffic to our IIS 8.5 (Windows 2012 R2) servers. The issue is that in the IIS logs, the IP address (c-ip field) is logged as the local address of our load balancer (a Sophos UTM, not Microsoft’s ARR) while we need to log the actual client’s source IP (which is provided in the “custom” X-Forwarded-For
header). I can’t use the “Advanced Logging” features of IIS to simply create another column as our log monitoring software can’t deal with this custom field, nor deal with the “_x” appended to the log file name.
Therefore, I have spent a number of hours trying to get Microsoft’s Request Router Helper to automatically convert the X-Forwarded-For
field value to the c-ip
field (which, I believe, it is supposed to do). Based on the reference sites I’ve listed below, I’ve done the following:
Are there any other things I need to do to enable/configure the Request Router Helper from ARR to automatically transpose the client IP into the c-ip field?
References:
IIS7/8: Logging the real client IP in the IIS hit logs
Client-ip not logged on application server when using ARR (original version for IIS 7)
After many hours, we found out how to enable this on IIS 8.5. Here are the steps:
C:\Windows\System32\inetsrv\config\applicationHost.config
and check its module registration under the globalModules section (it should be as follows)< add name="ARRHelper" image="%ProgramFiles%\IIS\ARR Helper\requestRouterHelper.dll" />
path="" / modules
< add name="ARRHelper" />
I hope this helps others that had this same frustration.