Forum Discussion

roger_willis_78's avatar
roger_willis_78
Icon for Nimbostratus rankNimbostratus
Jun 10, 2009

capturing IP Address

Forgive me in advance if I am in the incorrect area.

 

I am using VS2005/c and I am trying to request the user host address to log the users ip address to our database.

 

It logs our ip address and not the user host address. Does anyone have any insight to get this task done? Or is there no way around this?

 

 

Thank you.

3 Replies

  • Could you be a bit more specific on what you are trying to do? I'm assuming since you are using VS2005/C and you posted this on the iControl forum that you are using the iControl API and this is an iControl question.

     

     

    If you are writing an iControl client application, which method are you calling to get this information?

     

     

    I could understand if you are doing log gathering on your backend server (Pool Member) and you are retrieving the BIG-IP's address instead of the true client address? If this is what you are running into, you might want to turn on X-Forwarded-For in your virtual server config. It will forward the client's true address in the X-Forwared-For HTTP request header.

     

     

    Again, I'm not sure if this is where you issue lies, so if you could clarify a bit exactly what your application is doing and whether this is an iControl vs. a system configuration question, that would help us.

     

     

    -Joe
  • Hello Joe,

     

     

     

    I could understand if you are doing log gathering on your backend server (Pool Member) and you are retrieving the BIG-IP's address instead of the true client address? If this is what you are running into, you might want to turn on X-Forwarded-For in your virtual server config. It will forward the client's true address in the X-Forwared-For HTTP request header.

     

     

     

    From the statement above, do you have to modify the application to be able pick up this x-forwarded-for http request header? Since we do not use the apache webserver anymore instead we are using iRule to replace the plugin and have F5 point directly to our websphere portal cluster. I do not know to modify websphere to pick up the xforwarded-for IP. Is there any way to tweak F5 to pass the client address without any changes to application servers?

     

  • I believe the only way to have BIG-IP actually modify the client address is to setup a NAT.

     

     

    -Joe