It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Web Application Firewall

Logging Actual Client IP Address In the IIS 7 and IIS 7.5 Server

  • Last updated on

When the Barracuda Web Application Firewall is configured in Proxy mode, it uses the LAN/WAN IP address to communicate with the backend server. For this reason, the backend server does not see the actual client IP address coming from clients. By default, the Barracuda Web Application Firewall forwards the client IP address as the header X-Forwarded-For.

To log the actual client IP address instead of the WAN IP address (in case of one-arm proxy), or LAN IP address (in case of two-arm proxy) of the Barracuda Web Application Firewall in the IIS logs, do the following:

  1. Download and install the Microsoft Advanced Logging extension on the IIS 7.5 server to log the client IP address in IIS 7.5. Alternatively, download the 64bit MSI Package.
  2. After installation, open 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.


  3. Click Enable Advanced Logging under Actions.

  4. Click Edit Logging Fields under Actions.


  5. On the Edit Logging Fields window, click Add Field and then enter the details as shown in the image below in the Add Logging Field window.


    The Source name should be same as the value specified in Header for Client IP Address on the BASIC > Services page. This is applicable only if the upstream device is adding a header containing client IP address. If not, it should be X-Forwarded-For that is been set in the WEBSITES > Website Translation page.

  6. Click OK, and then scroll down and verify that the new Logging Field is listed.

  7. Click Add Log Definition under Actions.

  8. On the Log Definition window, enter the Base file name and click Select Fields.

  9. On the Select Logging Fields window, select the Client IP Header logging field created in Step 6 and click OK.

  10. Click Apply and then click Return to Advanced Logging under Actions.
  11. Now, the Client IP Header log definition will be listed on the Advanced Logging window. Select Client IP Header, right-click and then select View Log Files.

  12. The advanced logs should be available in the default location or the location you specified.

  13. Open the log file and view the client IP address logging.

  14. To log additional fields, add the required logging fields as mentioned in Step 8 and then repeat Steps 9 to 13.



To log the actual client IP address in IIS 8.5, follow the steps listed in Microsoft article Enhanced Logging for IIS 8.5.

Last updated on