Help: nslookup can't find localhost

Kevin Darcy kcd at daimlerchrysler.com
Thu Feb 15 21:14:03 UTC 2001


If you want "localhost" to resolve in DNS, you need to define a "localhost" zone. As you have discovered, you can't just throw the "localhost" entry
into an arbitrary zone like 0.0.127.in-addr.arpa and expect named to honor it...

Note, however, that nslookup *only* looks at DNS (except if you were on an HP-UX box, which you indicated you are not). So just because nslookup can't
resolve "localhost" doesn't mean ordinary system utilities like ping, telnet, ftp etc. can't resolve "localhost" from your /etc/hosts entry.


- Kevin

Rich Barnes wrote:

> I'm attempting to setup a 3rd DNS server running solaris 2.7 and BIND 8.2.3
>
> I have/had everything working correctly EXCEPT when I do an "nslookup
> localhost" from the command line I get:
>
> # nslookup localhost
> Server:  localhost
> Address:  127.0.0.1
>
> *** localhost can't find localhost: Non-existent host/domain
>
> I'm attaching my:
> named.conf file
> bind-load.log file
> zone file that loads the 0.0.127.in-addr.arpa zone (named.local)
>
> I have 2 other servers running Solaris 2.7 and BIND 8.2.3.  I've looked and
> looked at the configs and I can't figure out my problem.
>
> In my /etc/hosts file I have
>
> 127.0.0.1       localhost
>
> and I can ping localhost and 127.0.0.1 from the command line.
>
> -- Attached file included as plaintext by Listar --
>
> 15-Feb-2001 13:03:56.730 load: warning: Zone "0.0.127.in-addr.arpa" (file named.local): No default TTL ($TTL <value>) set, using SOA minimum instead
> 15-Feb-2001 13:03:56.732 load: info: named.local:15: data "localhost" outside zone "0.0.127.in-addr.arpa" (ignored)
> 15-Feb-2001 13:03:56.733 load: info: master zone "0.0.127.in-addr.arpa" (IN) loaded (serial 8)
> 15-Feb-2001 13:03:56.735 load: info: hint zone "" (IN) loaded (serial 0)
>
> -- Attached file included as plaintext by Listar --
>
> options {
>         directory "/etc/named.d";
> };
>
> logging {
>
>         channel admin-log {
>                 file "/etc/named.d/logging/bind-admin.log" versions 3 size 4m;
>                 print-category yes;
>                 print-severity yes;
>                 print-time yes;
>                 severity info;
>         };
>
>         channel load-log {
>                 file "/etc/named.d/logging/bind-load.log" versions 3 size 4m;
>                 print-category yes;
>                 print-severity yes;
>                 print-time yes;
>                 severity info;
>         };
>
>         category load { load-log; };
>         category config { admin-log; };
>         category db { admin-log; };
>         category eventlib { admin-log; };
>         category maintenance { admin-log; };
>         category security { admin-log; };
>
> };
>
> //
> // BIND data file to boot a primary name server.
> //
>
> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "named.local";
> };
>
> zone "." {
>         type hint;
>         file "named.ca";
> };
>
> -- Attached file included as plaintext by Listar --
>
> ;
> ; BIND data file for local loopback interface.
> ;
> 0.0.127.in-addr.arpa.   IN      SOA     thuban.blazenet.net. postmaster.blazenet.net. (
>                         8       ; Serial
>                         3600    ; Refresh
>                         300     ; Retry
>                         3600000 ; Expire
>                         3600 )  ; Minimum
> ;
> ; Nameservers
> ;
>                         IN      NS      thuban.blazenet.net.
> ;
> localhost.              IN      A       127.0.0.1
> 1.0.0.127.in-addr.arpa. IN      PTR     localhost.
>
> -- Attached file included as plaintext by Listar --





More information about the bind-users mailing list