Enable Client IP Logging in Exchange 2016 with F5 Load Balancer

For servers that reside behind load balancers like F5, X-Forwarded-For is used to log actual client IP address in the servers logs. Unlike in Apache, you need to perform additional step in IIS to log client IP address. Otherwise, you won’t find it in the IIS logs.

Step 1: Install Custom Logging in IIS 10

Step 2: Configure Custom Logging

  1. Open IIS Manager
  2. On server, site or application level, double click “Logging
  3. Click “Select Fields
  4. In “W3C Logging Fields” window, click “Add Field
  5. In the “Add Custom Field” window, fill out the following fields
    • Field Name: X-Forwarded-ForSource type: Request HeaderSource: X-Forwarded-For
    • No such X-Forwarded-For is available, type it manually
  6. Click “OK” in both open windows
  7. Click “Apply” in the actions pane

HostGator $2.75 per month
HostGator
24/7/365 Technical Support, Free Site Building Tools, 4500 Website Templates, Free Shopping Cart Software, Ideal for WordPress, 45 Day Money Back Guarantee

In IIS logs, you will notice the actual client IP-address in X-Forwarded-For column.