Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User Host Address behind firewall.

103 views
Skip to first unread message

Nathan

unread,
Mar 5, 2002, 11:54:01 PM3/5/02
to
I have my server setup using SBS2000 and when I request userhostaddress, it
shows as my internal ip address on the server, even for external web access.
I think I saw in the IIS logs that it shows their right ip address.
Can I get their IP address using request.userhostaddress? Or is there some
other method that someone can suggest?
Nathan


Matt Hooper

unread,
Mar 6, 2002, 11:13:19 AM3/6/02
to
Hi Nathan,

Are external connections going through a firewall? If so, this should be
the address of the firewall. Are the internal addresses going through a
proxy to get to the site? If so, then this value will be the address of
the proxy.

Basically, if a machine connects to the web server on the clients behalf,
this value will not be the address of the client. This is because the
value reflects the machine's address that is directly connected to the web
server. In this case the client is not directly connected, but instead
there are two connections (client <-> proxy <-> web site), so the web
server sees the IP address of the proxy/firewall. Due to this, I
unfortunately do not know of a way to reliably determine the client's ip
address (however, some HTTP proxies may forward it in a request header).

Also, take a look at the Request.ServerVariables collection. It contains
all information available about the client.

Hope this helps,

Matt Hooper
Microsoft ASP.NET Developer Support


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Nathan" <nar...@hotmail.com>

Nathan

unread,
Mar 6, 2002, 12:01:48 PM3/6/02
to
Hi Matt, are you in any way familiar with ISA2000? I'm assuming I have it
set up right because everything is flowing well, but I can't be positive.
However with the Web Publishing Rule, I redirect the incoming request to my
internal web server ip address and have "checked" the item "Send the
original host header to the publishing server instead of the actual one."
I just looked at the IP addresses in my IIS log for yesterday and they were
all the internal address. My mistake, I thought I had seen an external users
IP address before. I think this might be a question for the IIS/ISA
newsgroup. Thanks though.
Nathan

"Matt Hooper" <a-ma...@online.microsoft.com> wrote in message
news:7n#gFnSxBHA.1532@cpmsftngxa09...

Matt Hooper

unread,
Mar 7, 2002, 5:51:16 PM3/7/02
to
Hi Nathan,

I would recommend posting the question over to group(s) you mentioned.
Also, the Host header is not the address of the client, rather, its the
host name entered by the client. For example, if the client accesses
http://www.microsoft.com/page.htm, then the following header will be
included with the HTTP request:

Host: www.microsoft.com

Perhaps the "original host header" option is referring to this.

Hope this helps and best of luck,

Matt Hooper
Microsoft ASP.NET Developer Support


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Nathan" <nar...@hotmail.com>

Nathan

unread,
Mar 8, 2002, 1:01:15 AM3/8/02
to
Hey Matt, I appreciate, the help, but I posted on the ISA and SBS2000
newsgroups. Didn't get any help there, but never stopped looking for
information either and guess what? Today, I ran into the solution which was
soooo simple, but took care of every situation I needed.
The link was on Microsoft's ISA Server web site under tips.
http://www.microsoft.com/isaserver/using/tips/serverpubrules.asp
Thanks though

Nathan
"Matt Hooper" <a-ma...@online.microsoft.com> wrote in message
news:NQMGFqixBHA.1276@cpmsftngxa07...
0 new messages