My ASP.Internet application inspections the IP from the calling client.

But I must host it behind a Linux-Box where Apache redirects it for an internal Home windows 2003 Server running IIS like:

ProxyPass /srs http://192.168.21.15/srs/

where 192.168.21.15 may be the internal IP from the Home windows-server, and 192.168.21.1 the interior IP from the Linux box that will get the request from the web.

Now, it appears in my experience that demands from the web which are submitted to w.x.y.15 all appear to origin from w.x.y.1

How do i preserve (or forward) the initial IP?

I learned about X-submitted-for... but how do you retrieve this value in C# ??

Thanks, Reinhard

Generally if your proxy server modifies the Ip information the initial Ip is saved within the HTTP_X_Submitted_FOR server variable. To gain access to this in ASP.Internet using C# you should use:

Request.ServerVariables["HTTP_X_FORWARDED_FOR"]

For java candidates,

You should use String ipAddress=request.getHeader("X-Submitted-For")

For a moment use request.getRemoteAddr(), it might return 127...1 if there's been apache redirection at the deployment server.