[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CNAME in DNS: having a cname for a different domain than my domain...



* Irvin Temp (znah_irvin@yahoo.com) [021126 08:48]:
> i set up apache and name-base virtualhosting on my 
> box.  my pcs name is home-woody.dm0nkz.net then 
> created a vhost of
> 
> a) vhosta.testing.org
> b) vhostb.dm0nkz.net
> 
> so i then created a cname for vhostb.dm0nkz.net and 
> vhosta.testing.com
> 
> like 
> 
> ...
> home-woody.dm0nkz.net.  A  192.168.0.1
> 
> vhosta.testing.org. 		CNAME	hanz-woody
> vhostb				CNAME	hanz-woody
> 
> -------
> 
> I can ping vhostb but not vhosta.testing.org, is there
> wrong with my
> cname for vhosta.testing.org? can i do this at all? or
> i need to setup a
> another zone.. "testing.org" in my named.conf?

When your resolver goes to look up "vhosta.testing.org." (or
"anything.testing.org.", for that matter) there's no reason it would
think to look in the dm0nkz.net zone.  It asks the local resolver "get
me the address for vhosta.testing.org." and the resolver goes "I'm not
authoritative for testing.org ... who is?  I'll ask the root servers for
a hint."  The root server says "go ask dns3.ee.net, who you can find at
206.222.1.2."  Then your resolver asks dns3.ee.net "Hey, what's the
address for vhosta.testing.org?"  And dns3.ee.net says "There isn't
one."

If you want to override an address like this, just use /etc/hosts.  You
can put "google.com 192.168.0.1" in /etc/hosts if you want, and when
looking up google.com you won't make any DNS queries at all (if your
nsswitch.conf hasn't been mucked with, anyway) it'll just use the
address it found in the file.


good times,
Vineet
-- 
http://www.doorstop.net/
-- 
http://www.debian.org/

Attachment: pgpL_mhvPhS15.pgp
Description: PGP signature


Reply to: