By default, the Barracuda Load Balancer ADC forwards the client IP address in the X-Forwarded-For header.
To record the actual client IP address instead of the Barracuda Load Balancer ADC's custom virtual interface IP address in the IIS logs, do the following:
- Download and Install the Microsoft Advanced Logging extension on the IIS 7.5 server. Alternatively, download the 64bit MSI Package.
- Once advanced logging is installed, restart the IIS manager.
- Select the server root and then Advanced Logging. Select the individual website if you wish to enable and configure advanced logging options at the site level instead of server level.
- In the Advanced Logging window, select the default log definition (%COMPUTERNAME%-Server) and select the Enable Advanced Logging and Enable Client Logging options in the Actions pane. You can also create a new log definition and apply it to the server.
- Click the Edit Logging Fields… option. In the Edit Logging Fields window, note that the default Client IP uses the TCP client IP address to log the IP address in log files. Select the Client IP field and click Remove.
- Click Add Field to define the custom Client IP field. In the Add Logging Field window, specify values for all parameters and click OK.
- In the Advanced Logging page, double-click log definition. The Log Definition window appears. Select the field you created from the Selected Fields section and click Edit.
- In the Edit Field window, enter the Log header name, select the Required check box and click OK.
- Toggle advanced logging by disabling and enabling it in the Actions pane.
- Access the website and then click View Log Files in the Actions pane to view the actual source IP address in the log file.