resolver appends local domain name

Kevin Darcy kcd at daimlerchrysler.com
Tue Oct 29 00:07:22 UTC 2002


Alexander Bolovan wrote:

> On Sun Solaris 8 with BIND 9.2 -
> - system is configured as cache-only server
> - system needs to know about a few internal nodes which are configured
> in /etc/hosts file
> - name resolution is using forwarders at the ISP
> Issues:
> - nslookup does not seem to be using /etc/hosts as name resolution
> fails for all systems configured in the file
> - resolver adds the local domain name to any domain names it cannot
> resolve
> - this issues cause in turn issues with Sendmail which I have to run
> on the same system
> Questions:
> 1) is there a way to make nslookup use hosts file ?
> 2) how can I prevent the local domain be added to the domain names for
> whom name resolution fails ?
> ( Example of the issue:
> # nslookup
> Default Server:  localhost
> Address:  127.0.0.1
>
> > piatra.com
> Server:  localhost
> Address:  127.0.0.1
>
> Name:    piatra.com.mydomain.com  <--- ?
>
> >
> Below are the related configuration files.
> Any help will be greatly appreciated.
> Thank you.
>
> Configuration files:
> resolv.conf
> ------------
> domain mydomain.com
> nameserver 127.0.0.1
> nameserver ip-address1-at-isp
> nameserver ip-address2-at-isp
>
> nsswitch.conf
> -------------
> includes the line
> hosts: files dns
>
> named.conf
> ----------
> options {
>         directory "/etc";
>         forwarders { ip-address1-at-isp; ip-address2-at-isp; };
> };
> zone "." {
>         type hint;
>         file "db.rootcache";
> };
>
> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "db.127.0.0";
>         notify no;
> };
>
> db.127.0.0
> ----------
> ;
> ; db.127.0.0
> ;
> $TTL    86400
> @       IN      SOA     mysystem.mydomain.com. postmaster.mydomain.com
>  (
>                                  1025021624 ; Serial
>                                  28800      ; Refresh
>                                  14400      ; Retry
>                                  3600000    ; Expire
>                                  86400 )    ; Minimum
>              IN      NS      mysystem.mydomain.com.
> 1            IN      PTR     localhost.

1) No, not unless you want to recode it.
2) Remove that "domain" directive from /etc/resolv.conf.

Since you're running your own nameserver, why do you need to use
/etc/hosts at all? Seems like it would make more sense to set up your
internal domain on your nameserver.

By the way, modern versions of sendmail allow you to configure its
nameservice behavior independently of the rest of the system.


- Kevin




More information about the bind-users mailing list