Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client IP issue address over https with Rackspace Cloud Load Balancers

We're currently using Lighttpd with FastCGI to serve PHP to our clients. We recently added load balancing through RackSpace Cloud to help us handle our traffic however, the client's IP is now the load balancer IP. All traffic is through HTTPS.

We've enabled mod_extforward and have tried all different configuration for with using our LB IP and the different headers ("X-Forwarded-For","Forwarded-For","X-Cluster-Client-Ip") and we cannot seem to get this to work!

Any ideas? Thank you!

like image 804
Kaiser Avatar asked Nov 09 '11 00:11

Kaiser


2 Answers

If you're using Rackspace's Cloud Load Balancers, you won't be able to get the client's IP address over SSL.

For plain HTTP, the balancers can do intelligent things (the "service unavailable" page, X-Forwarded-for, etc.) However, the load balancers can't do anything other than ferry bytes between the client and server over HTTPS, because, without the private key, there's no way to modify the stream (other than making it invalid.)

Someone asked this question on the Rackspace forums a little while ago.

like image 126
jon Avatar answered Nov 01 '22 02:11

jon


According to Rackspace, SSL Termination should not be used if your web application is transmitting Personal Identifiable Information (PII)

http://www.rackspace.com/knowledge_center/product-faq/cloud-load-balancers

I'm having to resort to setting the client's IP in a cookie. The cookie is set in javascript. The client's IP is obtained by making a jsonp call to a server (not behind a load balancer) that provide's the client's public IP. This is all I can think of where I can still utilize Rackspace's Cloud Load Balancer.

like image 25
Bombastar Avatar answered Nov 01 '22 03:11

Bombastar