[svlug] Re: virtual domain names inside the LAN

Daevid Vincent daevid at daevid.com
Tue Aug 27 15:36:51 PDT 2002

After re-reading this, I am still a bit confused. I get what your
saying, I just don't get why it works like that.

It seems to me that if people outside my LAN get routed to the right IP
( and then Apache handles it from there, how come it isn't
the case that when Lynx on my Linux box ( makes the
request, it goes out to the DNS server, doesn't it get returned the same
IP as everyone else, and therefore shouldn't it go to and then Apache handles it again like any other request?
How and/or Why is the internal request being sent to instead
of I know I re-iterated what you said to some degree, but
the key phrase I guess is this, when lynx goes to why
doesn't Apache handle it again like any other incoming request"

And I looked at 'man hosts' and see:

EXAMPLE       localhost    foo.mydomain.org  foo    bar.mydomain.org  bar   master.debian.org      master www.opensource.org

So should mine look like:		daevid localhost.localdomain localhost
daevid.com	www.marq.org ftp.marq.org marq.org marq	www.VRExhibits.com ftp.VRExhibits.com VRExhibits.com
VRExhibits	www.frizbcd.com ftp.frizbcd.com frizbcd.com frizbcd

Can I stack the same IP like that or does it have to be on one long
And do I need to have all four permutations of each domain (www. ftp.
.com name)?
Should the IP be or for all the virtual domains?

> -----Original Message-----
> Quoting Daevid Vincent, from the post of Tue, 27 Aug:
> > Shouldn't the linux box know about itself and all it's own virtual 
> > domains? I mean, how come if I'm telnetted in, and I "lynx 
> > http://www.marq.org" or "lynx http://www.daevid.com" it 
> doesn't know 
> > that those virtual domains are itself, but rather sends me to the 
> > router which is  Whereas external people can get there 
> > just fine.
> when you tell lynx to open a connection to www.daevid.com it 
> looks it up in the hosts file (which is where you want to put 
> it as an alias to or your ethX address) and then 
> the DNS. since you have nothing in your hosts file, lynx goes 
> to which is not an IP address of your machine, 
> nor on your default network, so the request is sent out via 
> the default router. straight and simple. the machine doesn't 
> know its names, it knows where to route IP-addressed packets. 
> it is the responsability of the browser, proxy but mainly the 
> resolver library to get your request to the right  web 
> server, and you can't expect lynx to look in the local apache 
> config to see if your request should actually remain inside 
> the machine and not do the round trip to the NAT router.
> therefore - /etc/hosts hacks.

More information about the svlug mailing list