[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

James

1/8/2003 8:34:00 AM

Hello,

I have a problem. I'm writing a Web Service and Client
App using C#. I want to get the IP address of the client
machine but the client machine are behind a web proxy. So
when I try to get the IP of client machine, by using
Server Variable, the function gives me the IP of the web
proxy.
Can any one help me on how to get the real IP of the
client behind the web proxy?

Network Structure:
Client Machine -> Web Proxy -> Web Server (hosting the
Web Service)

Thanks,

James Yip
3 Answers

Pierre Greborio

1/8/2003 9:07:00 AM

0

There is no way on doing that from the server, since the proxy is
masquerading the internal IPs. The only solution is to ask the client to
send this information in some manner.

Pierre

--
-----------------------------------------------------------
Pierre Greborio
http://www.ugi...
-----------------------------------------------------------
"James Yip" <jamesykh@netvigator.com> wrote in message
news:114401c2b6e8$5bd5c780$d3f82ecf@TK2MSFTNGXA10...
> Hello,
>
> I have a problem. I'm writing a Web Service and Client
> App using C#. I want to get the IP address of the client
> machine but the client machine are behind a web proxy. So
> when I try to get the IP of client machine, by using
> Server Variable, the function gives me the IP of the web
> proxy.
> Can any one help me on how to get the real IP of the
> client behind the web proxy?
>
> Network Structure:
> Client Machine -> Web Proxy -> Web Server (hosting the
> Web Service)
>
> Thanks,
>
> James Yip


Manni

1/9/2003 12:58:00 AM

0

Since the proxy makes the request instead of the client,
the reply adress is the proxy's!

So there is no way to figure out the real originator!

Manfred


Adam Selene

1/11/2003 10:56:00 PM

0

Inspect all the HTTP headers. Many proxies will put the requestor IP address
in another header.

Look for these in particular:

HTTP_VIA
HTTP_PROXY_CONNECTION
HTTP_X_FORWARDED_FOR
FORWARDED
CLIENT_IP
HTTP_FROM

Adam

> Can any one help me on how to get the real IP of the
> client behind the web proxy?