Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Barracuda Web Application Firewall
Results will update as you type.
  • How to Update Your Notification Email Addresses
  • What's New in the Barracuda Web Application Firewall
  • 30-Day Evaluation Guide - Barracuda Web Application Firewall
  • Getting Started
  • Deployment
  • Services
  • Securing HTTP/HTTPS Traffic
  • Advanced Bot Protection
  • Client-Side Protection
  • API Security
  • Advanced Security
  • IP Reputation-Based Filters
  • Tuning Security Rules
  • Barracuda Active Threat Intelligence
  • Access Control
  • Traffic Management
  • Configuring User-Defined Patterns
  • Logging, Reporting and Monitoring
    • Logs Overview
      • Types of Logs
      • Log Storage Capacity
      • How to Make the Client IP Address Available to the Backend Server in Proxy Mode
        • Configuring Client Impersonation
        • Logging Actual Client IP Address on the Apache Server
        • Logging Actual Client IP Address In the IIS 7 and IIS 7.5 Server
    • Exporting Logs
    • Reporting
    • Simple Network Management Protocol (SNMP)
    • Events and Notifications
  • High Availability
  • Networking
  • System Administration and Maintenance
  • Certificate Management
  • Centralized Management of the Barracuda Web Application Firewall
  • Attacks Description - Action Policy
  • REST API
  • Common Web Application Attacks
  • How to Set Up Barracuda Cloud Control
  • End of Support and End of Life Information
  • Critical Vulnerabilities in Web Application
  • Barracuda Advanced Bot Protection Cloud Infrastructure Upgrade Information
  • Barracuda WAF 12.2 Firmware Hardened to Augment Security of Product Features

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Logging Actual Client IP Address on the Apache Server
    Updated Nov 25, 2019

    Logging Actual Client IP Address on the Apache Server

    Nov 25, 2019
    Subscribe

    To extract and log the actual client IP address from the X-Forwarded-For header of a request using an Apache server, make the following changes to the server:

    1. Log into the Apache server.

    2. Go to /etc/httpd/conf or /usr/local/apache2/conf path and open the file httpd.conf.

    3. Search for the string: “LogFormat “%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined”

    4. Change the %h to %{X-Forwarded-For}i. The string now appears as “LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined”

    5. Save the file and restart apache or httpd.


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 10, "requestCorrelationId": "316e62f500004a8191f6d97c19b32029"}