Forum Discussion

NewTOF501_15047's avatar
NewTOF501_15047
Icon for Nimbostratus rankNimbostratus
May 15, 2014

X-forwarder is not working

I Enabled the Insert X-Forwarded-For option in the HTTP profile. I am getting null in instead of IP in IBM Http server using following code. LogFormat "%v %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" X-Forwarded-For CustomLog logs/access_ip_log X-Forwarded-For

 

Question1: Is Insert X-Forwarded-For option work with http & https as well? Question2: Can i sees Client IP in fildder after enabling Insert X-Forwarded-For option in the HTTP profile?

 

why it is not working?

 

20 Replies

  • http://support.f5.com/kb/en-us/solutions/public/4000/800/sol4816.html this is i am following
  • Question 1: X-forwarded-for header will work for both HTTP and HTTPS, but you must ensure that you are terminating SSL (using a client SSL profile) on your HTTPS virtual server to give the BIG-IP visibility into the layer 7 data.

     

    Question 2: Yes, if you are sniffing the traffic at the server side with something like Fiddler or Wireshark, you should be able to see the client IP address in the X-forwarded-for header field within the capture.

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      You aren't seeing it in the IBM server log. You need to verify whether the BIG-IP is sending it in the first place to determine whether the issue is with BIG-IP or your server logging mechanism. You can either run a packet capture on the server (Wireshark) or on the BIG-IP (tcpdump).
    • NewTOF501_15047's avatar
      NewTOF501_15047
      Icon for Nimbostratus rankNimbostratus
      i checked request header with fiddler. there is nothing. This vs configure with Source Address Translation = automap
  • i checked request header with fiddler. there is nothing.

     

    isn't fiddler run on client? i think you have to run tcpdump on bigip and check x-forwarded-for header in server-side (between bigip and server) packet.

     

  • i checked request header with fiddler. there is nothing.

     

    isn't fiddler run on client? i think you have to run tcpdump on bigip and check x-forwarded-for header in server-side (between bigip and server) packet.

     

    • NewTOF501_15047's avatar
      NewTOF501_15047
      Icon for Nimbostratus rankNimbostratus
      i ran command. now i am viewing in wireshark how to find Client IP forwarded?
    • NewTOF501_15047's avatar
      NewTOF501_15047
      Icon for Nimbostratus rankNimbostratus
      i ran command. now i am viewing in wireshark how to find Client IP forwarded?
  • now i am viewing in wireshark how to find Client IP forwarded

     

    this article explains how standard virtual server with layer 7 (virtual server you are using) sets up a connection between client and server.

     

    sol8082: Overview of TCP connection setup for BIG-IP LTM virtual server types

     

    http://support.f5.com/kb/en-us/solutions/public/8000/000/sol8082.html

     

    so, you have to match client-side packet and server-side packet. at the server-side packet, look for x-forwarded-for header.

     

    • NewTOF501_15047's avatar
      NewTOF501_15047
      Icon for Nimbostratus rankNimbostratus
      sorry i am able to see IP in x-forwarded-for but why it not appearing in fiddler or ibm http server . it printing null in log LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_forwarded SetEnvIfNoCase X-Forwarded-For "." from_proxy=1 CustomLog logs/access_ip_log combined_forwarded env=from_proxy
  • now i am viewing in wireshark how to find Client IP forwarded

     

    this article explains how standard virtual server with layer 7 (virtual server you are using) sets up a connection between client and server.

     

    sol8082: Overview of TCP connection setup for BIG-IP LTM virtual server types

     

    http://support.f5.com/kb/en-us/solutions/public/8000/000/sol8082.html

     

    so, you have to match client-side packet and server-side packet. at the server-side packet, look for x-forwarded-for header.

     

    • NewTOF501_15047's avatar
      NewTOF501_15047
      Icon for Nimbostratus rankNimbostratus
      sorry i am able to see IP in x-forwarded-for but why it not appearing in fiddler or ibm http server . it printing null in log LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_forwarded SetEnvIfNoCase X-Forwarded-For "." from_proxy=1 CustomLog logs/access_ip_log combined_forwarded env=from_proxy
  • but why it not appearing in fiddler or ibm http server.

     

    isn't fiddler capturing packet between client and bigip (virtual server)? the x-forwarded-for is inserted on packet between bigip and server. i do not think you can see it in fiddler.

     

    about why it does not log in ibm server, i think you had better check with ibm server administrator. :)