May 23rd, 2004, 11:45 PM
Why cant I access my website from my LAN
First of all I have router with NAT capability and a web server running on one of my machines within the lan.
I do not have a DNS server....I'm using a free public DNS server.
When I type in the web url of my website (www.mywebsite.com) from within the lan, all I see is title of the web page on the top of IE explorer and the error: "Action canceled
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable."
When I type in the private lan ip address of the machine that runs the web server (192.168.0.100) the website comes up fine.
Also, I can access the website from the "outside" (ie, work) by simply typing in the web url so my webserver is fine.
Does this have anything to do with my ISP's router not allowing packets to loopback?
Any help appreciated!
May 24th, 2004, 12:59 AM
Easy. You're typing in your domain, an external DNS server is resolving it to your external IP. Mean while, you're on your lan, which is all configured with your internal addressing because of NAT.
Many routers/firewalls will recognize the request as being for an external IP that's part of your network, and do the NAT translation for it as well. Some of the routers/firewalls that we see in the home user market do not.
Simple solution? Add the domain to your hosts file on the machines on your lan. For windows (which I assume you're using), go to:
add the following line:
save the file, and you'll be in a happy place.
Hope that helps!
May 24th, 2004, 01:03 AM
I imagine your name servers resolve your web site URL to the external IP address of your router, which probably forwards port 80 to the machine on your network that is running the web server. If this is the case, you will be unable to access your site using the URL because you must use the internal IP address (hence why using 192.168.0.100 works but www.mywebsite.com doesn't). I have the exact same problem on my network and as far as I am aware there is nothing you can do about it other than getting an extra static IP and assigning it to the server machine.
Edit: Looks like JP beat me to it.
BTW, the hosts file suggestion will work, but you'll get problems if you want to use it on more than one machine on your network, because you'll have to keep them all in sync. It's a throwback to the days when hosts really were controlled by one file that was updated regularly.
May 24th, 2004, 05:54 AM
doesnt' seem to work. I even tried typing in:
since i had to change my port number because my isp blocks port 80.
any more suggestions?
May 24th, 2004, 06:00 AM
Call me stupid, but couldn't that be it?
because my isp blocks port 80.
May 24th, 2004, 06:07 AM
That's what I had in mind, but didn't know if the DNS service was resolving to his IP. It wouldn't be able to connect and the website wouldn't work if that port is blocked.
Also, if your ISP is blocking port 80 and the DNS service is resolving to your IP address xx.xx.xx.xx:80 then that won't work. You'll need to use a port redirecting service.
May 24th, 2004, 06:48 AM
Sorry, this might be a silly question but: You did use the name of your website and not mywebsite.com didn't you? (I would hope you have used www.mywebsite.com as a sanitized version of your real website, and that you made this change with the real website)
Told you this was a silly question, but I have had people take some advice a little to literally, and now I just like to check such things.
\"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, Champagne in one hand - strawberries in the other, body thoroughly used up, totally worn out and screaming WOO HOO - What a Ride!\"
May 24th, 2004, 08:17 AM
i've got a similar problem, could spyder elabo on port directing services????
see the sarcasim in my smile
May 24th, 2004, 10:01 AM
Remove the :8181. It shouldn't be in your hosts file.
Experience is something you don't get until just after you need it.
May 24th, 2004, 11:20 AM
As SirDice was saying, the port number shouldn't be in the hosts file. This is because the hosts file acts like an internal DNS list. When you type in an address, as far as I am aware, the computer will check this file first to try and resolve and address.
DNS simply resolves a domain name like www.mywebsite.com as you were using in your example above and doesn't care about port numbers. This means that if you want to run other servers on your computer that's acting as a webserver, to access it from your other computer, you don't need to do anything because you've already added the server to your hosts file.
It's the same way that you don't have to register a domain name for every port you use with it, you just need to register the name and specify what ip address it is attached to.