Link to home
Start Free TrialLog in
Avatar of Nani Infopeer
Nani Infopeer

asked on

Bind configuration

We have a DNS server [BIND] in our environment, This was built for setting name resolution for our internal network.

All the VM's in our environment use this for name lookups.

We had added public forwarders in bind configuration, so if there is some name outside our environment they will be transferred to them for lookups.

Now there is a case where, I need to have our DNS server forward requests to other DNS based on domain name.

Example:

domain.local is the intial configuration
if the request comes to DNS for
internaldomain1.com it should query 192.188.10.10
if the request comes to DNS for internaldomain2.com then it should query 192.188.10.12


Please let me know how can we accomplish this
Avatar of noci
noci

.local is reserved for mdns (Multicast DNS) you will get a warning (example.local) / error (.local) from bind (recent versions) when a domain ends with .local. (AVAHI is the server for this).

You can create forwarding zones in bind with: btw.

zone internaldomain1.com {
     type forward;
    forwarders { 192.188.10.10; };
};

Open in new window

Why not avoid this and setup this system with secondary zones that get it pulled from the two dns servers in question

it is similar to the example noci provided, but will save the resources of forwrding the requests while using storage resources locally

you would need to authorize your system rights to transfer zones from the respective "master"

zone "internaldomain1.com" {
type slave;
file "slave/db.internaldomain1.com";
masters {192.168.10.10;};
};

zone "internaldomain2.com" {
type slave;
file "slave/db.internaldomain2.com";
masters {192.168.10.12;}
};

not sure if you have two servers on the network, why each only hosts one domain.

Usually, to handle redundancy and load distribution, one would setup a single server with all the domains, and then add one or a few name servers as slaves that will retrieve the data from the master. Should the master fail, one of the slave's is easily reconfigurable to be the new master.
I'd go a step further than arnold.

Only use real domains, then your public forwarders will handle the lookup + there's no change to your DNS.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.