Re: Can I run an Internet web server from a Win2K computer?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Robbie Hatley wrote:
Four days ago, "Simon" <simon@xxxxxxxxxxxxxxx> wrote in reply
to my message about getting a web site running in remote-
accessible mode from an IIS server on a Win2K computer on a LAN
connected to the Internet through a router and a DSL modem:

It seems to me that your IIS is all configured well.
I think that your problem is simply that you cannot
get a connection out through your router onto the
internet and then back in on your static IP address.
I have the same problem with my installation. From
inside the network I have to use the local computer
IP address, but from outside the network it works
using the static IP of the ISP. I suggest that you
ask a friend to try it over the internet. you may
find it's all working.

Wow, you hit the nail right on the head! Thanks very much
for your reply! Yep, when I had a friend look at the web
site on my computer from a remote location, he could see it
just fine. Apparently, not only is the local IP usable only
locally, but the remote IP is usable only remotely. I very
much wonder why that is. I should think that the remote IP
address would be global, and would work the same from inside
my LAN as from a remote location. But apparently not.

It's a routing thing and the way that networks work. A packet is routed by its destination IP address. So if the packet sets off from your PC it either a) goes straight to the destination machine, or b) goes to the default gateway if the address is NOT a local one.

All machines on your local network belong to the same 'subnet'. For instance, if your machine has an IP address of 192.168.2.7 and the netmask is the default (255.255.255.0, don't worry about it), then anything starting 192.168.2 is *local*. If you connect to 192.168.2.99, then this is a local address and the packet goes direct.

If you send to an Internet address (what you call remote) then the packet is NOT destined for a local address so it goes to the default gateway. The gateway's interface IP address is an internal IP address. When the packet is received there the destination IP address is compared to the interface's IP and they are found to be different. The packet is therefore sent on to the gateway's default gateway, the other side of the gateway and is lost. It doesn't ever get checked against the outgoing interface's IP address - nothing ever is with TCP/IP.

That's it, briefly. I left out a lot of detail.

Cheers,

Cliff

.



Relevant Pages