Overwrite domains

Kevin Darcy kcd at daimlerchrysler.com
Wed May 31 00:54:19 UTC 2006


YorHel wrote:
> Hello world,
>
> I have a small home network and a simple webserver/router. Some
> external domains (.com/.net's) should point to the webserver
> (192.168.0.1). In my current setup, I just manually add those domains
> to /etc/hosts and copy the file to the other computers in the network.
> This is pretty annoying work and /etc/hosts does not support wildcars,
> so I decided to run a DNS server on the webserver/router.
>
> The DNS server should first check the domains specified in the local
> zone file, and when no results are found, it should query the DNS
> servers of my ISP. It wasn't very hard to configure and run named (BIND
> 9.3.2) with the following named.conf: (some irrelevant configuration
> not included)
>
> options {
>   directory "/var/named";
>   pid-file "/var/run/named/named.pid";
>   listen-on port 53 { 192.168.0.1; 127.0.0.1; };
>   allow-recursion { 192.168.0.0/16; 127.0.0.1; };
>
>   forwarders { 195.121.1.34;  195.121.1.66; }; // ISP DNS servers
>   forward first;
> };
>
> zone "localnet.local" IN {
>   type master;
>   file "localnet.zone";
> };
>
>
> localnet.zone contains the computernames and domains and the IP
> adresses (in apropriate format) and I am able to lookup the
> computernames (for example: a 'fileserver' points to the appropriate
> address), but not the other domains which should "overwrite" the
> information found on the ISP DNS servers.
>
> Is there a way to first check the local zonefiles and then query the
> ISP DNS servers?
>   
Checking local data happens automatically, on a zone-by-zone basis, but 
not a record-by-record basis. There is no provision for 
forward-on-NXDOMAIN -- or for that matter forward-on-NODATA, or 
forwarding based on any particular response condition -- within BIND. 
Your "internal" version of the zone needs to be a superset of what your 
ISP has.

                                                                         
                                 - Kevin



More information about the bind-users mailing list