I am setting up two small isolated networks. Neither of these networks will have an Internet connection. I am trying to provide DNS and DHCP to both networks via a single Ubuntu server I have available, and while DHCP is working file, I have never set up BIND before.
Following the DNS Howto guide, I edited named.conf.local and told it to look for the configurations to my two domains (network1.local and network2.local) in /etc/bind/db.network1.local and db.network2.local. Btw, network1.local is on eth0, network2.local is on eth1.
I then went ahead and copied db.local to each of those two files and edited them to provide an A record for the nameserver itself, ns.network1.local.
However, I see nothing in the configuration that would prevent hosts on network1 from receiving DNS resolution for names on network2.local. What can I do to prevent this from occurring? Is there any way to bind BIND (ugh) to a single domain for each interface?
Perhaps a better question would be, should I do this? Or is there a better way of hosting two zones via each NIC? Should I use something other than BIND?
I'm winging this off of something I set up for myself a few years ago, but you could use views to separate the domains you server. I used this so I could provide my RFC1918 addrs to my local clients and my public addresses to public clients, but I think it would work for what you want to do.
Something like this (assuming clients on network1.local are using 192.168.0.0/24 and clients on network2.local are using 192.168.1.0/24):
I can't remember if there's more to it than that but that should give you a toehold on it. Good luck.