# Solved: Webserver accessed internally, but not externally



## DexterDave (May 10, 2011)

Hi All

I'm running a home webserver via IIS. Now I am using a free domain name from DynDns. Now my account works fine and the domain name is correctly mapped to my routers external IP address(I used nslookup to verify that)

No I can access my webserver from any computer in the LAN by using the webservers local IP: 10.0.0.253. But when I use the domain name, I get a connection timeout. Now on my router, I did forward port 80 for my webserver to my local IP, and I enabled Dynamic DNS on my router, using dyndns.org and the correct username and password. I even use the automatic ip dns updater provided by DynDns.

I also added port rules for port 80 on Windows firewall...

Why can't I access my webserver externally?

IIS site settings: *http 80 10.0.0.253*. These are the only fields I filled in. There is one other field I left blank, which is the hostname, but even completing it with my dyndns hostname does not work. Also tried using my external IP address in place of local ip address in these settings, but no luck.

Thank you


----------



## cwwozniak (Nov 29, 2005)

Have you actually tried accessing your server using a computer on the Internet, rather than with a computer on your LAN. Some routers can not handle a loopback, where a computer on the LAN is trying to access the IP address of WAN.

Also, if you have residential Internet service, your service provider may not allow running a server as part of the terms of service and may be blocking access.


----------



## DexterDave (May 10, 2011)

Thank you cwwozniak

Yes, both the PC I used to test is connected to the internet. But another guy on another forum says he can access my web page, so I guess the DNS server that I used has not been updated yet. However, when I use the external WAN IP address (http://41.188.311.12:80), I still get a timeout. 
Why is that?



cwwozniak said:


> Also, if you have residential Internet service, your service provider may not allow running a server as part of the terms of service and may be blocking access.


No, they do not block it...I tested that.

Thank you


----------



## Ent (Apr 11, 2009)

DexterDave said:


> Thank you cwwozniak
> 
> Yes, both the PC I used to test is connected to the internet. But another guy on another forum says he can access my web page, so I guess the DNS server that I used has not been updated yet. However, when I use the external WAN IP address (http://41.188.311.12:80), I still get a timeout.
> Why is that?
> ...


I'm reasonably sure that's not really your IP address. That's probably for the better; you don't really want to be publishing it.


----------



## cwwozniak (Nov 29, 2005)

DexterDave said:


> both the PC I used to test is connected to the internet. But another guy on another forum says he can access my web page, so I guess the DNS server that I used has not been updated yet.


Are the PC used for testing and the server connected on the same internal LAN? If so, the problem may be as I first stated. Your modem's and/or router's NAT and port forwarding abilities may not support one computer on the LAN to reach another computer (server) on the LAN by its port forwarded Public IP Address. This ability is called loopback and you would need to check if your modem and router support it.

Were you trying to hide the Public IP address in your post? The last time I checked, each part of an IPv4 address has to be in a range of 0 through 255. The "311" number is bogus.


----------



## DexterDave (May 10, 2011)

@cwwozniak: Yes, that is just an example IP address, thus bogus...

My router does support loopback, I think. How do i test it? I actually set up a server last year and it worked fine when using the hostname, never tried using the IP address before, so don't know if it is right doing: http://ipaddress:80. Also, for the PC on which I have the server, as well as the other PC I cannot access the site externally - whether using the hostname or external IP.

And yes, I have 2 PC's, the one is running the server and the other PC is just there for testing among other things.

But as I said, a friend of mine could access the hostname...so if he can access my server (from his home, on another network), why can't I access my Webserver using just the external IP, since my DNS server has not been updated with the hostname yet...?


----------



## ehymel (Aug 12, 2007)

Things to check:

1. Can you ping your server from within your LAN using the external IP address?
2. Are you sure hits to that IP address (ping or http) are getting through your router? Check your router logs, check your server logs. If the request is not getting to your router, then that narrows the problem to your local client. If getting through the router but not to server, then look to your router for the problem. If getting to your server, then the logs should give clues about the problem.
3. Make sure you haven't manually overwritten your windows hosts file... I've done that during testing and forgotten to revert, then get confused as hell when things don't work as expected!


----------



## DexterDave (May 10, 2011)

1. Yes, I can ping it. No packet loss - So why can't I request the index.html page via the browser?
2. Ok cool, will check logs. Don't even know if my router have logs, but it probably does...
3. Nope, host file looks fine...

Thank you for your answer


----------



## DexterDave (May 10, 2011)

The problem is solved now. I think my DNS server was not properly updated...I see that directly entering an IP address instead of a hostname still goes through the DNS servers, due to the fact that I couldn't access my server with just the ip address (my external IP). I can now however use both hostname and external IP to visit my server from within my LAN network...

Thanks for all the help guys! Appreciate


----------

