Forum Discussion

muzammil_88686's avatar
muzammil_88686
Icon for Nimbostratus rankNimbostratus
May 12, 2013

X-Remote-Addr is showing as 0.0.0.0

Dear Dev Team,

 

Users are trying to access the URL "www.test.com/connect"

 

We are seeing X-Remote-Addr as 0.0.0.0 in HTTP header for some requests and we are seeing the "actual client ip address" for some requests on the same VIP

 

Nodes will determine the action to be performed based on -X-Remote-Addr.

 

Whenever the request consists of X-Remote-Addr as "0.0.0.0" the requests are failing.

 

BTW, we have LTM with WA module.

 

Could you pls someone give any suggession on how to overcome this behaviour?

 

6 Replies

  • What is inserting this header, the F5 or something else? If the F5 how are you doing this. If not then I'll assume it's some upstream device that's the cause of the issue.
  • X-Remote-Addr is getting inserted by Web Accelerator.

     

     

    GET /connect HTTP/1.1

     

    Connection: keep-alive

     

    Host: www.test.com

     

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

     

    User-Agent: Mozilla/5.0 (X11; CrOS x86_64 3912.43.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.69 Safari/537.36

     

    X-Chrome-UMA-Enabled: 1

     

    X-Chrome-Variations: CM61yQEIj7bJAQictskBCKa2yQEIqLbJAQiptskBCLq2yQEI/IPKAQishcoB

     

    Accept-Language: en-US,en;q=0.8

     

    Cookie: test_cookie=2063336970.20480.0000

     

    Surrogate-Capabilities: WA="ESI/1.0", WA="ESI-Inline/1.0"

     

    Accept-Encoding: identity

     

    X-Remote-Addr: 0.0.0.0

     

    X-Client: WA

     

    X-PvMAC: 00:01:D7:A2:6B:01

     

  • how are you doing this via the web accelerator? "X-Remote-Addr is getting inserted by Web Accelerator."

     

    This is normally done in the HTTP profile in version 10 and 11, by selecting > Insert X-Forwarded-For enabled

     

  • Drew_Kane_23142's avatar
    Drew_Kane_23142
    Historic F5 Account
    The pvac process (pvac is the WebAccelerator data plane daemon in 9.x and 10.x) will insert the X-Remote-Addr for traffic it processes. If pvac processing is bypassed- for example, when the system is under a lot of load and the request queue is full- then the chunk pvac code that writes the client IP address into the X-Remote-Addr header can be bypassed as well. Hence, you see 0.0.0.0 rather than the real client IP address.

     

     

    You can use an iRule to change the X-Remote-Addr header's value to what it should be. Something like this:

     

     

    when HTTP_REQUEST_SEND {

     

    clientside {

     

    if { [HTTP::header exists "X-Remote-Addr"] and [HTTP::header "X-Remote-Addr"] equals "0.0.0.0" } {

     

    HTTP::header replace "X-Remote-Addr" [IP::client_addr]

     

    }

     

    }

     

    }

     

     

     

    Addressing the cause of the WebAccelerator bypass or enabling/using the X-Forwarded-For header are other options to do instead of/in addition to the iRule workaround above.
  • Thank you Kane for your reply!

     

     

    We have lot of other iRules on LTM for the same VIP for different URI/Paths.

     

     

    Can we get this iRule to be modified for specific URI/Path( for example /connect) only? Could you pls suggest one Irule for specific URL(www.test.com/connect)?