Trying to setup a local DNS.

Kevin Darcy kcd at daimlerchrysler.com
Thu Nov 7 22:10:08 UTC 2002


Okay, I think I have all of the pieces of the puzzle now, but I'm still
a little confused. You said you are trying to ping the name
"host.mydomain.com" from an internal client, which is using this
nameserver (listening on address 10.20.25.1) to resolve DNS, but you end
up trying to ping an external address instead of 10.20.25.1. Do I have
that right?

Since you don't have "host.mydomain.com" defined anywhere, you should be
getting "host not found" instead of the wrong address. Is "host not
found" what you were expecting? That's what confuses me -- i.e. why you
would deliberately try to ping a non-existent name.

As for the source of the problem (i.e. reporting the external address
instead of "host not found"), it's almost as if you have a typo in your
named.conf file, so that instead of loading, say, mydomain.com, you're
actually trying to load mydoamin.com (or some other misspelling), which
wouldn't match the zone file. Another possibility is that there is some
problem with the mydomain.com zone file, causing it to not load properly
(possibility: I see some whitespace in front of the "@" record, which
would cause the zonefile to not load;  is that just an artifact of your
posting software, or is it really in the zone file?). If the zone is
failing to load, for whatever reason, there should be some error
messages in your logs.

If the mydomain.com zone isn't loading properly, then when you query for
a name in that zone, it'll go out to the forwarders and get the external
address. So this would explain the symptoms you are seeing.


- Kevin


David H wrote:

> Kevin thank you for looking at this for me!
> my named.conf looks like this.
> ---- begin -------
> options {
>         directory "/var/named";
>         /*
>          * If there is a firewall between you and
> nameservers you want
>          * to talk to, you might need to uncomment the
> query-source
>          * directive below.  Previous versions of BIND
> always asked
>          * questions using port 53, but BIND 8.1 uses
> an unprivileged
>          * port by default.
>          */
>         // query-source address * port 53;
>         // allow-transfer { none; } ;
>         // recursion no;
> /*      forward first;
>         forwarders {
>                 216.227.56.120;
>                 64.34.4.36 ;
>         };
> */
> };
>
> //
> // a caching only nameserver config
> //
> zone "." IN {
>         type hint;
>         file "root.hints";
> };
>
> zone "localhost" IN {
>         type master;
>         file "zone/localhost.zone";
> };
>
> zone "0.0.127.in-addr.arpa" IN {
>         type master;
>         file "zone/127.0.0";
> };
>
> zone "mydomain.com" IN {
>         type master;
>         file "zone/mydomain.com" ;
> };
>
> zone "11.6.10.in-addr.arpa" IN {
>         type master;
>         file "zone/10.6.11";
> };
>
> ----- end ---------
> --- Kevin Darcy <kcd at daimlerchrysler.com> wrote:
> >
> > David H wrote:
> >
> > > This is what in my server. And mydomain is also
> > > registered DNS with dev.mydomain.com as a A record
> > > and MX record. My other worksstation only has one
> > DNS
> > > entry that is 10.6.11.5. I tried to ping
> > > test.mydomain.com it does not work.
> > >
> > > My localhost.zone
> > > ------------------ begin --------------
> > > $TTL    86400
> > > $ORIGIN localhost.
> > > @                        IN SOA mydomain.com.
> > > webmaster.mydomain.com. (
> > >                                         2002110101
> > >          ; serial (d. adams)
> > >                                         3H
> > >  ; refresh
> > >                                         15M
> > >  ; retry
> > >                                         1W
> > >  ; expiry
> > >                                         1D )
> > >  ; minimum
> > >
> > > localhost.               IN NS  dev.mydomain.com.
> > >
> > >                          IN A           127.0.0.1
> > >
> > > ------------------ end -----------------
> > >
> > > My ARPA file name "127.0.0"
> > > ------------------- begin -------------
> > > $TTL    86400
> > > @       IN      SOA     mydomain.com.
> > > webmaster.mydomain.com.  (
> > >                                       2002110101 ;
> > > Serial
> > >                                       28800      ;
> > > Refresh
> > >                                       14400      ;
> > > Retry
> > >                                       3600000    ;
> > > Expire
> > >                                       86400 )    ;
> > > Minimum
> > > 0.0.127.in-addr.arpa.           IN      NS
> > > dev.mydomain.com.
> > >
> > > 1.0.0.127.in-addr.arpa.         IN      PTR
> > > localhost.
> > >
> > > ------------------ end ----------------
> > >
> > > My mydomain.zone
> > > ---------------- begin -----------------
> > > $TTL 3D
> > >   @               IN      SOA     mydomain.com.
> > > webmaster.mydomain.com. (
> > >                                   2002110101
> > ;
> > > Serial
> > >                                   8H      ;
> > Refresh
> > >                                   2H      ; Retry
> > >                                   4W      ; Expire
> > >                                   1D)     ;
> > Minimum
> > > TTL
> > >
> > > mydomain.com.               NS
> > dev.mydomain.com.
> > >
> > > mydomain.com.               MX 10
> > dev.mydomain.com.
> > >                                 TXT     "This is
> > my
> > > domain"
> > >
> > > localhost               IN      A       127.0.0.1
> > >
> > > dev.mydomain.com.   IN      A       10.6.11.5
> > >
> > > test.mydomain.com.  IN      CNAME
> > dev.mydomain.com.
> > >
> > > ---------------- end --------------------------
> > >
> > > my ARPA file name "10.6.11"
> > > --------------- begin -------------------------
> > > $TTL 3D
> > >   @       IN      SOA     mydomain.com.
> > > webmaster.mydomain.com. (
> > >                           2002110102      ;
> > Serial,
> > > todays date + todays serial
> > >                           8H      ; Refresh
> > >                           2H      ; Retry
> > >                           4W      ; Expire
> > >                           1D)     ; Minimum TTL
> > > 11.6.10.in-addr.arpa            IN        NS
> > > dev.mydomain.com.
> > >                                 IN        MX
> > > dev.mydomain.com.
> > > 5.11.6.10.in-addr.arpa.         IN        PTR
> > > dev.mydoamin.com.
> > > --------------- end ------------------------------
> > >
> > > Thanks
> > > David
> > >
> > > --- Kevin Darcy <kcd at daimlerchrysler.com> wrote:
> > > >
> > > > David H wrote:
> > > >
> > > > > Hi All,
> > > > >
> > > > > I have registered my domain with register.com
> > and
> > > > with
> > > > > a mydomain.com and A "A Record"
> > host.mydomain.com
> > > > and
> > > > > A MX Record host.mydomain.com. Then I set up
> > my
> > > > DNS on
> > > > > my local server with a makeup ip 10.20.25.1
> > point
> > > > to
> > > > > host.mydomain.com. My workstation is using
> > > > 10.20.25.1
> > > > > as the primary DNS only. But it still using my
> > > > > internet ipaddress when I ping it even I do
> > not
> > > > have
> > > > > the forward first entry comment out at option.
> > > >
> > > > a) Please post your named.conf and zonefiles
> > > >
> > > > b) Turn on query logging and confirm that the
> > > > workstation is actually
> > > > using the local server to resolve DNS.
> >
> > Those look somewhat reasonable. What does the
> > named.conf look like?
> >
> >
> > - Kevin
> >
> >
> >
>
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2



More information about the bind-users mailing list