cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Client IP address to my server running HTTPS website in HTTP header

SOLVED
New Contributor

How to pass Client IP address to my server running HTTPS website in HTTP header

Hi All,

Can you please let me know how to pass Client IP address to my server running HTTPS website in HTTP header?

Which trafficscript to use in order to achieve this? Anything to be done on the server side?

 

Thank you,

RHA

 

Tags (3)
6 REPLIES
Highlighted
Occasional Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

Hey there, pilgrim.  Go to your Virtual Service and click Connection Management  --> HTTP-Specific Settings.  There are two options to forward remote client IP's and one is enabled by default.  At the server check for a header named X-Cluster-Client-Ip.  X-Forwarded-For is the other. If your server is looking for a specific header and not either of these then you can accomplish that with a TrafficScript.  Do you need the TrafficScript?

New Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

Thanks a lot Cignul9

This is a setting for HTTP only. I will apply it for HTTP website that I gave

For the HTTPS, can you please share the traffiscript as teh website is HTTPS.

Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

If your web application needs a secure Southbound connection, then you can also use Traffic Manager to re-encrypt to HTTPS to secure the connection to the application nodes.

 

This allows you to terminate incoming HTTPS connections, perform full L7 traffic inspection and apply business rules, then create a secure HTTPS onward connection to the application nodes, ensuring that there is no cleartext over the wire.

 

New Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

I am using Stingray Virtual Loadbalancer.

To resolve this, I had to decrypt the SSL traffic (add the certificate on the virtual load ballancer), add the rule Add-XFORWARD-FOR and re-encrypt the traffic. 

 

Basiscally, SSL Offload on the load balancer is required. 

Occasional Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

Please explain what is the x-forader and how i can use it 

Contributor

Re: How to pass Client IP address to my server running HTTPS website in HTTP header

If you are looking for some simple background on X-forward, then there are some good independent articles out there, such as:
https://en.wikipedia.org/wiki/X-Forwarded-For

 

You might wish to use this to indicate the originating IP address of HTTP requests - for instance, when forwarding requests to other systems. If the original IP address is not available, then the target system may only be able to use the IP address of your vTM, and may be unable to log or filter on the originating IP address.

 

For example, as an alternative to IP Transparency, you could set the vTM “add_x_forwarded_for” option to pass the client IP address to the server in the “X-Forwarded-For” HTTP header (as mentioned above)