[afnog] Resolve non-FQDN with Bind
Alan Barrett
apb at cequrux.com
Mon Oct 22 16:36:50 UTC 2007
On Sun, 21 Oct 2007, tawanda kavayi wrote:
> 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";
> };
OK so far.
> 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?
I assume you also have an SOA record and at least one NS record.
Check the syslog for error messages from named. It's probably refusing
to allow both a CNAME record and other records (NS and SOA) for the same
name. I'd replace the CNAME record with the data that you actually want
(probably an A record).
DNAME won't work for this (it would redirect *.host
to *.host.domain.com, but would not redirect "host" itself).
Phil's suggestion of editing a private copy of the root zone should also
work, but then you have the problem of keeping the copy up to date. I
suppose you could use a "view" to make the fake root zone invisible to
all except the one misbehaving device, and then not care about keeping
it up to date, but I still wouldn't do it that way.
--apb (Alan Barrett)
More information about the afnog
mailing list