LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Load Balancer IP in remote_addr.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2008, 09:34 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
Default Load Balancer IP in remote_addr.

Hi, I'm having an issue with getting the client IP because the load balancer is forwarding its own IP.

I have a LiteSpeed LB and 2 Litespeed WS.

What is the correct way to get the IP from the client? Is there a transparent way, or does the load balancer have to forward it some how?


Thanks,

Matt.
Reply With Quote
  #2  
Old 04-01-2008, 09:38 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
I think I got it as "HTTP_X_FORWARDED_FOR" but is that just as accurate?
Reply With Quote
  #3  
Old 04-01-2008, 09:38 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Use this option in your LSWS

http://www.litespeedtech.com/docs/we...pInProxyHeader
Reply With Quote
  #4  
Old 04-01-2008, 09:43 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Quote:
Originally Posted by Matthew_K View Post
I think I got it as "HTTP_X_FORWARDED_FOR" but is that just as accurate?
Its value is the remote IP : port that LB saw. If "X-Forwarded-For" exist in the request that LB receives, LB will append remote IP to it. You can use the last address listed if you want.

If you set the option in my previous post, LSWS will set "REMOTE_ADDR" to the first IP listed in "X-Forwarded-For" header.
Reply With Quote
  #5  
Old 04-01-2008, 09:54 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
Great. Thanks. I'm going to use that option. It will save me lots of time.

Also, will the user agent info still be fowarded?
Reply With Quote
  #6  
Old 04-01-2008, 10:00 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
yes, it is.
Reply With Quote
  #7  
Old 04-01-2008, 10:03 AM
Matthew_K Matthew_K is offline
Member
 
Join Date: Mar 2008
Posts: 39
Fantastic... I've got to say, you guys are great. You're very responsive. I'll be letting my network buddies know.

Thanks,
Matt.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:24 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.