HOSTS

Running a Web server (or FTP etc.) on a PC behind WinRoute

You may want to run your web server on a PC behind WinRoute (with a private IP address e.g. 10.10.10.8). You may also want a domain for your server. For this to work, the domain e.g. yourdomain.com must resolve to the Internet routable IP address that must be associated with the WinRoute computer. WinRoute's NAT and port mapping will allow traffic destined to a particular port to be forwarded to the internal server at 10.10.10.8. In order for port mapping to work however, traffic must arrive at the NAT'd interface. When local computers on the 10.10.10.0 subnet try to connect to www.yourdomain.com they get the public/Internet routable address, which is the address of the WinRoute computer. Since this traffic arrives to WinRoute through the non-NAT'd interface it will not be mapped to the actual server. To compensate for this situation you must configure all local users to use the IP address of WinRoute as their primary DNS server. This is easily done through DHCP. Then you will use WinRoute's built in DNS forwarder as the DNS server for your computers.

In the HOSTS file you will add another entry where you will say that www.yourdomain.com is operating at the appropriate internal (private class) IP address. You will let the DNS forwarder look at your HOSTS files before it will send a DNS query to the regular server.

Then every time users send a request for www.yourdomain.com such requests will be answered by the appropriate local address.