Using WebTen with an IP-Translating Router

Some routers (such as Netopia routers) have the ability to remap "real" internet IP numbers to a completely different set of IP numbers on a site's internal network. For example one host on your network may have assigned to it's ethernet interface, but because the router re-maps these IP numbers, the rest of the world sees it as something completely different, say, If you try to set up WebTen on such a network your browser will display a "Cannot retrieve URL" error message from squid when you try to access a site from the other side of the router. If you're running with the cache turned off, you won't encounter this problem.

What's happening is this: Squid receives the http request just fine, since the router handles the IP number translation for this connection. Since squid doesn't have anything cached yet, it initates an http request of its own, this time using the URL included in the original http request header. This URL contains either the external IP number ( in our example) or a host name which resolves to this external IP number. doesn't exist inside our network, so eventually the request times out and squid reports an error.

In order to get around this problem you'll need to get the server to listen to the external IP number as well as its internal IP number. Here's how:

The above steps will need to be repeated for each IP-based virtual host you create. Host-header based virtual hosts only require one additional external host for all hosts which share a common IP number.

Page last updated 12/28/1999