localhost and rndc.conf in BIND 9

Doug Barton DougB at dougbarton.net
Tue Dec 31 20:50:16 UTC 2002

Simon Waters wrote:
> Jun Wang wrote:
>>I am using BIND 9 and wondering in which zone file I
>>can put "localhost" record, even I have it in
>>/etc/hosts? For example:
>>localhost.   IN    A
> "localhost." belongs in the root zone so "you" probably can't
> put it there.

Incorrect. There is no localhost. zone in the real root zone, and there 
is nothing stopping you from creating a localhost zone on your local server:

zone "localhost" { type master; file "master/localhost.db"; };

In localhost.db:
$TTL 1h
@ SOA localhost. hostmaster.example.com. (
         42 1d 12h 1w 10m )
         ; Serial, Refresh, Retry, Expire, Neg. cache TTL

         NS      localhost.



More information about the bind-users mailing list