Forum Discussion

evelyn_28284's avatar
evelyn_28284
Icon for Nimbostratus rankNimbostratus
Jan 05, 2012

How to get the clientIP

Hi,

 

im trying to get the client ip, have tried using the header (x-forwarded-for) but it is not returning the correct ip.

 

 

I have F5 to communication to Apache, and then from Apache, will go to my application Sever: JBoss.

 

 

I have trying using the header(x-forwarder-for), but im getting the ip of the Apache Server.

 

 

 

Any configuration required for F5? so that i can get the client ip?

 

3 Replies

  • if communication between apache and jboss is brand new connection, i think nothing much bigip can do.
  • Hey Evelyn.

     

     

    So, it sounds like the original VIP is inserting an x-forwarded-for address (client ip) then passes the connection back to the Apache server. Doe the Apache server call into a VIP for the App Server? is that VIP set up to also insert an x-forwarded-for? If the App Server VIP is only going to be used for web service type calls, just pull that part of it out and as long as the Apache server is set to send along the original x-forwarded-for information, it should arrive at the app server.

     

     

    Or course, if it's a direct call from the Apache server to the App Server, the F5 won't be able to do anything.

     

     

    HTH

     

    Cameron