Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Windows localhost (IIS) from another computer

I have a Windows Vista laptop running IIS7 for its localhost. On this machine, I can successfully navigate to:

  • "http://localhost"
  • "http://127.0.0.1"
  • "http://mycpuname"

However, I cannot access this localhost website from another computer on the same network. Ideally I would be able to visit "http://mycpuname" (so that I can hard-code a connection), but at this point I might settle for the IP address of the machine (http://192.000.000.xyz)

I've seen similar questions asked here and elsewhere on the internet... but none of the posts seems to fix the issue for me.

Things I've tried: - adding exceptions to Windows Firewall to allow TCP ports 80 and 8080 - disabling Windows Firewall entirely - running the "netsh" commands in this post

Additionally, I am looking at the IP address on the Windows laptop by running "ipconfig" from the command prompt. Oddly enough, trying to access "http://192.000.000.xyz" from the Windows laptop doesn't seem to work...

I have also tried restarting IIS and restarting my machine.

Help?

like image 414
arthurakay Avatar asked Aug 17 '12 15:08

arthurakay


People also ask

How do I access localhost IIS from another computer?

Locate your IP Address Type "ipconfig" and press enter key. Here, the "IPv4 Address" is the IP address of your PC on the LAN. Now, you can replace the localhost with the IP Address in your website URL. (Like, use "http://192.16x.xx.xx:9300/login.aspx" in place of "http://localhost/login.aspx").

Can localhost be access from another computer on network?

localhost is a special hostname that almost always resolves to 127.0. 0.1. If you ask someone else to connect to http://localhost they'll be connecting to their computer instead or yours. To share your web server with someone else you'll need to find your IP address or your hostname and provide that to them instead.


2 Answers

Go to windows firewall with advanced security, inbound rules and check and see if world wide web services is enabled. I had this same issue, and this fixed it for me.

like image 169
ajalex Avatar answered Sep 29 '22 15:09

ajalex


Try netstat -na - it will show you what IP addresses your web server is listening on.

If it's only listening on 127.0.0.1, the loopback, you will have to re-configure the web server to listen on all addresses/interfaces (usually either *.*.*.*, or 0.0.0.0 in some config file, or just some drop-down in some windows dialog somewhere).

If, on the other hand, netstat tells you the web server is listening on *.*.*.* or 0.0.0.0, i.e. all interfaces, then you have to figure out what's blocking the traffic - it's either the local firewall, or something on the path between the two computers.

like image 39
Nikolai Fetissov Avatar answered Sep 29 '22 14:09

Nikolai Fetissov