httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HyperHacker <hyperhac...@gmail.com>
Subject Re: Is this possible ?
Date Thu, 20 May 2010 20:59:20 GMT
On Thu, May 20, 2010 at 08:23,  <export@hope.cz> wrote:
>
>  Let’s suppose this configuration
>
>  |Server1| <----- |Server2| <----- |Client|
>
>  A client sends a request that starts a script on Server2.The script ( running on server2)
>  will download a webpage from Server1.
>  Is it possible to record Client’s IP on Server1, instead of Server2’s IP? In other
words,
>  Server1 will think the request for downloading is directly from Client.
>  That is Server2’s IP will be “invisible” for Server1
> (Server1  and Server 2 are Apache servers)
>
>  Is this possbile?
>
>  Thanks
>  J.
>

Generally, no. Server1 needs to know whom to send the response to.
There may be cases where you can transparently pass an entire packet
on and do some magic to make things work as if the client connected to
Server1 directly, but that's not something a web server would usually
be doing.

Now, you can pass the client's IP along with the X-Forwarded-For
header or similar method, but then you have to be careful. A client
could spoof his address by inserting his own X-Forwarded-For (but some
proxy servers also legitimately use this header). If clients are able
to connect directly to Server1 (even if you don't give out the
address), then you'll want to use a more secure method of exchanging
the information.

-- 
Sent from my toaster.

Mime
View raw message