[afnog] Resolve non-FQDN with Bind

Phil Regnauld regnauld at x0.dk
Sun Oct 21 20:21:35 UTC 2007


tawanda kavayi (kavayit) writes:
> 
> The one word domain sounds like a good hack. I've tried it but am having
>  difficulty with the syntax. E.g., I created a zone called "host", with
> an entry in named.conf like:
> 
> zone "host" in {
>         type master;
>         file "master/host";
> };
> 
> In the zone file, I have:
> 
> host.		IN	CNAME 	host.domain.com.
> 
> But I get SERVFAIL when I try a dig for host. Should I be using DNAME here?

	There's 2 problems here:

	1. Some configuration issue

	- what does named-checkconf /path/to/named.conf say ?
	- what does named-checkzone host /path/to/master/host say ?

	Maybe the SOA is wrong, maybe the NS are missing, but bind has
	problems loading your zone.

	2. This will not work.  You are declaring the zone "host", but
	then you have "host." IN CNAME host.domain.com.

	Best case (without the .), you'll end up with "host.host.",
	worst case you're hitting "CNAME and other data", since you can't
	have both SOA/NS/... and a CNAME.

	You might have to use an A record there...  Or you load the root zone (.)
	as master, and add your "hosts" as TLDs, using CNAMEs.  That will work.

	P.




More information about the afnog mailing list