Solutions

Logging the downstream client IP in the access log of the upstream ProxySG in a proxy chain

Solutions ID:    KB1892
Version:    3.0
Status:    Published
Published date:    03/02/2009
Updated:    08/24/2010
 

Problem Description

Logging the downstream client IP in the access log of the upstream ProxySG in a proxy chain
You want to log the downstream client IP in the access log of the upstream proxy in a proxy chain

Resolution

In proxy chaining environments, the upstream (or parent) proxy logs all traffic as originating from the downstream (or child) proxy. To have the upstream proxy log the originating client's IP in its access logs,  modify both the downstream and upstream proxies. The modification is to configure the downstream proxy to add an HTTP header showing the originating client's IP, and to configure policy on the upstream proxy to modify access logging based on this added header.

To set this up, perform the following:

On the downstream ProxySG (the proxy that the clients communicate to first):

  1. Issue the following command in the CLI:

    ProxySG#(config) http add-header x-forwarded-for
    ok

On the upstream ProxySG:

  1. In the VPM, create a new Web Access Layer by selecting Policy > Add Web Access Layer.

     
  2. Right-click the Source field and select Set > New > Request Header.

    Header Name: X-forwarded-For
    Header Regex: . (note there is a dot here)

     
  3. Right-click the Action field and select Set > Override Access Log Field.

    Log Name: [All]
    Field Name: c-ip
    rewrite value to:$(request.header.X-Forwarded-For)

     
  4. Install the policy.

Rate this Page

Please take a moment to complete this form to help us better serve you.

Did this document help answer your question?
 
 
If you are finished providing feedback, please click the RATE CONTENT button. Otherwise, please add more detail in the following text box and then click RATE CONTENT.
 
 

Your response will be used to improve our document content.

Ask a Question