D
danknauf
I have a webserver which is behaving strangely. The server is a fresh
copy of Windows 2003 running IIS with default options + Active Server
Pages installed. The server is connected to a Linksys router, and has
a static IP address of 192.168.1.10.
When I access a page with the following script directly from the
server, my WAN IP address is returned (24.x.x.x.), instead of my LAN
address.
<%
Dim sIPAddress
sIPAddress = Request.ServerVariables("REMOTE_ADDR")
Response.Write "<h1>IP Address = <b>" & sIPAddress & "</b></h1>"
%>
Everything I've read about the REMOTE_ADDR server variable tells me
that it should return the IP address of the machine accessing the
page. Shouldn't this return the 192 address?
When I view the page as //localhost/dev/ip.asp, it returns the 127.
address, but when I view the page using my domain name, it returns the
external IP.
Any suggestions?
copy of Windows 2003 running IIS with default options + Active Server
Pages installed. The server is connected to a Linksys router, and has
a static IP address of 192.168.1.10.
When I access a page with the following script directly from the
server, my WAN IP address is returned (24.x.x.x.), instead of my LAN
address.
<%
Dim sIPAddress
sIPAddress = Request.ServerVariables("REMOTE_ADDR")
Response.Write "<h1>IP Address = <b>" & sIPAddress & "</b></h1>"
%>
Everything I've read about the REMOTE_ADDR server variable tells me
that it should return the IP address of the machine accessing the
page. Shouldn't this return the 192 address?
When I view the page as //localhost/dev/ip.asp, it returns the 127.
address, but when I view the page using my domain name, it returns the
external IP.
Any suggestions?