[CLUE-Tech] simulating DNS function

David Anselmi anselmi at anselmi.us
Sun May 9 17:22:41 MDT 2004


Gus S.Calabrese wrote:
[...]
> Is there a form like 111.111.111.111:mydomain  to go to
> my domain located at 111.111.111.111 ?

There is not in the usual browsers that I'm aware of.  Some other tools 
might support that sort of thing.

The web server gets the domain from one of the HTTP headers.  It is 
filled out by the browser from the URL you type.  So if you type the IP 
address, that's what goes in the header.

But what you can do is add entries to your /etc/hosts file.  Do 
something like this on the machine you browse from:

111.111.111.111 domain.name.one
111.111.111.111 domain.name.two
111.111.111.111 domain.name.three

Then (on the browsing machine) you can use those names in the URL but 
the IP that gets looked up will be the same for all of them.  Note that 
the hosts line of /etc/nsswitch has to have files before dns as well 
(probably it does).

If you're browsing from Winders look in the system directory (something 
like c:\windows\system32) for drivers\etc\hosts -- does the same thing 
but the format might be a little different.

HTH,
Dave




More information about the clue-tech mailing list