Author Topic: IIS 7.0/7.5 with x-forwarded and client ip in logs.  (Read 4163 times)

Kosch

  • Senior
  • ***
  • Posts: 22
    • View Profile
    • www.kosch.co.uk
IIS 7.0/7.5 with x-forwarded and client ip in logs.
« on: December 08, 2010, 06:49:02 pm »
Hello

Has anyone found a way to make IIS 7.0/7.5 log the x-forwarded-for value as the clients IP in the IIS logs. With IIS 6.0 we just used an ISAPI filter provided by our Zeus reseller but this no longer works with the latest greatest.

I dont really want to enable logging on the traffic manager if I can get away with it.

I did try this but as my comment on the post suggests I couldnt get it working.

http://blogs.iis.net/anilr/archive/2009/03/03/client-ip-not-logged-on-content-server-when-using-arr.aspx


kriksik

  • Member
  • **
  • Posts: 9
    • View Profile
Re: IIS 7.0/7.5 with x-forwarded and client ip in logs.
« Reply #1 on: January 04, 2011, 12:26:06 pm »
Hi,
The following worked for me.
Install the arr helper and change the file c:\Windows\System32\inetsrv\config\schema\arr_helper_schema.xml like so:
replace:    <attribute name="xForwardedForHeaderName" type="string" defaultValue="X-Forwarded-For" />
with:    <attribute name="xForwardedForHeaderName" type="string" defaultValue="X-Cluster-Client-Ip" />

you need to enable the add_cluster_ip property on the traffic manager also.


Morten

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: IIS 7.0/7.5 with x-forwarded and client ip in logs.
« Reply #2 on: June 07, 2011, 12:50:50 pm »
Hi,
The following worked for me.
Install the arr helper and change the file c:\Windows\System32\inetsrv\config\schema\arr_helper_schema.xml like so:
replace:    <attribute name="xForwardedForHeaderName" type="string" defaultValue="X-Forwarded-For" />
with:    <attribute name="xForwardedForHeaderName" type="string" defaultValue="X-Cluster-Client-Ip" />

you need to enable the add_cluster_ip property on the traffic manager also.

Thanks!
Very helpful this. Now there's no reason not to put Zeus in front of every webserver!