Overwrite domains

YorHel yorhel at gmail.com
Sat May 27 10:57:20 UTC 2006


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?

Thanks in advance,
Yoran Heling.



More information about the bind-users mailing list