Virtual Server / Port Forwarding does not work from within the Local Network
When you use port forwarding in Virtual Servers and try to test it from within the local network, it may fail. When for example, port 80 is forwarded to a web server in the local network, you may get the router's home page instead of the web server's one or you may get nothing at all. When you try to use the server from outside the local network it will work fine though.
This can happen when you try to access the router's WAN IP address from within the local network. In order for port forwarding to work from within the local network, the router needs to support a feature called NAT loopback. This is not a part of the specification of Belkin routers and modem-routers, so most of them will not have the feature, and if a router does have it, it is not supported.
In order to use the server from within the LAN, you can address it by its internal LAN IP address (e.g. 192.168.2.101).
If the WAN IP address has a DNS host name associated with it, such as www.example.com, and you need to use that name to connect to the server, you can do so by associating the name to the local IP address in the hosts file (a file called hosts with no extension). This file lists IP addresses and host names and is used before actual DNS lookups are done. You can add lines to the hosts file using a text editor like Notepad on Windows. The lines look like:
192.168.2.101 www.example.com www.otherdomain.com # comment
The lines contain an IP address and one or more host names separated by white space. Anything that follows a hash sign is a comment and will be ignored. You will need to change the hosts file on all machines in the LAN that need access to the server.
On Windows, the hosts file can be found in C:\Windows\System32\Drivers\Etc on Windows XP, Vista and Windows 7, in C:\WinNT\System32\Drivers\Etc on Windows 2000, and in C:\Windows on Windows 98 and ME. You need to have administrator rights to edit the file; on Windows Vista and Windows 7 you need to run Notepad as administrator.
on May 05, 2010 | Computers & Internet