Forum Discussion

pedinopa_170325's avatar
pedinopa_170325
Icon for Nimbostratus rankNimbostratus
Dec 09, 2015

Client Source address

I enabled x-forwarded-by for a VS in an irule and in my http profile. I enabled advanced logging on my server but no data is returned for the X-FORWARDED-FOR field. This server runs IIS 8 (do I need both the x-forwarded-for filters from f5 as well as the microsoft advanced logging?

 

9 Replies

  • Have you configure advanced logging to capture the header?

     

    http://blogs.iis.net/deanc/iis7-8-logging-the-real-client-ip-in-the-iis-hit-logs

     

    Also, you don't need x-forwarded-for enabled in both an iRule and your http profile. Chose one or the other. The profile would be more efficient. Also, if at all possible I would recomend moving to IIS 8.5 on 2012R2 as it now has Enhanced Logging which is easy to add any header or cookie value to your logs from the IIS logging management console.

     

    • Brad_Parker's avatar
      Brad_Parker
      Icon for Cirrus rankCirrus
      You will require a client SSL profile and an HTTP profile for an HTTPS VS.
  • Have you configure advanced logging to capture the header?

     

    http://blogs.iis.net/deanc/iis7-8-logging-the-real-client-ip-in-the-iis-hit-logs

     

    Also, you don't need x-forwarded-for enabled in both an iRule and your http profile. Chose one or the other. The profile would be more efficient. Also, if at all possible I would recomend moving to IIS 8.5 on 2012R2 as it now has Enhanced Logging which is easy to add any header or cookie value to your logs from the IIS logging management console.

     

    • Brad_Parker_139's avatar
      Brad_Parker_139
      Icon for Nacreous rankNacreous
      You will require a client SSL profile and an HTTP profile for an HTTPS VS.
  • I tend to add the original Client IP into either an additional Cookie-Value or adding it to the User-Agent-String. Both fields can be logged by IIS (any version) out-of-the-box.

     

    AT Brad: Thanks for sharing the link. Good to know that IIS has now some plugins for this task...

     

    Cheers, Kai

     

  • we adjusted the VS profile (removed the irule). Made the changes to the web.config file on the server. The logs still do not pull the client ip.