Question : Setting up Local DNS with Bind

I am attempting to setup a local DNS server using Bind.  I think I have almost got it working, at least on the host where the service is running, but I am not sure about how other systems on my subnet must be configured in order to use dns.  

Host1
Fedora Core 7
Vanilla Kernel 2.6.23
bind.x86_64   31:9.4.2-2.fc7
192.168.xxx.186

Host2
Fedora Core 7
Vanilla Kernel 2.6.23
bind.x86_64   31:9.4.2-2.fc7
192.168.xxx.185

Host3
W2K3
192.168.xxx.187


Host1 has bind configured as a name-caching server.  It also appears that my zones are correctly setup, though I am not for certain.  My named.conf look like this:

# Let only the local machine be the master server
controls {
      inet 127.0.0.1 allow { localhost; } keys {rndckey; };
};

include "/etc/rndc.key";


########################################
# The file used for the local domain's records:
########################################
zone "foo.com" IN {
        type master;
        file "foo.com.zone";
            allow-update {key "rndckey"; };
            allow-transfer {192.168.xxx.0/24; };
            notify yes;
};




########################################
# Reverse Zone for foo.com domain:
########################################
zone "xxx.168.192.in-addr.arpa" IN {
        type master;
        file "xxx.168.192.in-addr.arpa.zone";
            allow-update {key "rndckey"; };
            allow-transfer {192.168.xxx.0/24; };
            notify yes;        
};




options {
        directory "/var/named";
        allow-query { foo; };
            query-source address * port 53;
            listen-on { 127.0.0.1; };
            listen-on { 192.168.xxx.186; };
        forwarders { 68.87.73.242; 68.87.71.226; }; # ISP primary/secondary
            forward only; #rely completely on our upstream nameservers
};


acl foo { 192.168.xxx.0/24; 127.0/8; };

zone "." {
      type hint;
      file "named.ca";
};

My resolve.conf looks like this:

nameserver 127.0.0.1

My first foward zone looks like this:

$TTL 8H

foo.com.         IN      SOA          isz-server01.foo.com. iszmaster.foo.com. (
                                      200712240                 ; serial
                                      2H                        ; refresh slaves
                                      5M                        ; retry
                                      1W                        ; expire
                                      1M                        ; Negative TTL
                                      )

                                          IN      NS            isz-server01.foo.com.

isz-server01.foo.com.           IN      A       192.168.xxx.186                 ; FC7 server
isz-server02.foo.com.           IN      A       192.168.xxx.185                 ; FC7 server
isz-server03.foo.com.           IN      A       192.168.xxx.187                 ; W2K3 server
isz-router01.foo.com.            IN      A       192.168.xxx.10                  ; Vyatta router 1
isz-router02.foo.com.          IN      A       192.168.xxx.20                  ; Vyatta router 2

;Aliases
@                        IN      A      192.168.xxx.186                     ; FC7 server
www                        IN          A          192.168.xxx.186                 ; FC7 server
trac                           IN       A       192.168.xxx.186                       ; FC7 server
svn                        IN       A      192.168.xxx.186                     ; FC7 server

And my reverse zone looks like this:

$TTL 8H
@      IN      SOA      isz-server01.foo.com. iszmaster.foo.com. (
                  200712240            ; serial
                  2H                         ; refresh slaves
                  5M                        ; retry
                  1W                        ; expire
                  1M                        ; Negative TTL
                  )

@      IN      NS      isz-server01.foo.com.

186     IN      PTR     isz-server01.foo.com.
185     IN      PTR     isz-server02.foo.com.
187     IN      PTR     isz-server03.foo.com.


I can ping isz-server01.foo.com on Host1 and I get replies.  I can also dig www.google.com and see the first time that the time was 50ms and the second time is like 0ms so caching is working.

Now, how do Host2, Host3, and any other system on my network look to Hot1 to resolve DNS?

Thanks!


Answer : Setting up Local DNS with Bind

For the linux / Fedora m/c point them to your dns server in /etc/resolv.conf

e.g.

domain foo.com
nameserver      Put.your.dnsserver.ip

For the windows m/c configure dns under tcp/ip properties


Random Solutions  
 
programming4us programming4us