: Configuring Global HTTP(s) Load Balancer with XFF Header
Focus
Focus

Configuring Global HTTP(s) Load Balancer with XFF Header

Table of Contents

Configuring Global HTTP(s) Load Balancer with XFF Header

The Palo Alto Networks NGFW can read the XFF field and use the XFF IP address when enforcing security policy. Additionally, you can configure various logs and reports to display the XFF IP address along with the source IP address.
Following are the steps to add Client Source IP Header to HTTPS Load Balancer
  1. Run the following gcloud command to add the client’s source IP address as a custom header. Replace <backend-services> with your backend service that contains the VM-Series instance group.
    gcloud compute backend-services update <backend-service> \ --global \ --custom-request-header='X-Forwarded-For:{client_ip_address}'
  2. Your HTTPS load balancer’s custom request headers should like the image below:
  3. In your VM-Series web interface, go to Device > Setup > Content-ID >X-Forwarded-For Headers.
  4. Set Use X-Forwarded-For Header to Enabled for Security Policy.
  5. Commit the changes.
The following are the steps to view the Custom Header in Traffic Logs:
  1. Go to Monitor > Traffic.
  2. Add the X-Forward-For IP log field to view the client IP address.
  3. Curl your web server through the HTTPS load balancer.
  4. The traffic logs should now contain your client source IP address under the X-Forwarded-For IP column.