2

I am trying to configure DNS to run two domain names. I am able to do one domain but am not sure how to configure a second domain.

So for example: test.com and test1.com on same machine.

How do i configure zone file and named.conf to achieve this?

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
tike
  • 643
  • 1
  • 5
  • 18

2 Answers2

1

Each domain would have its own zone file with its own records. In named.conf, each zone gets its own declaration as such:

zone "example.com" in{
  type master;
  file "example.com.dns";
  // enable slaves only
  allow-transfer {192.168.23.1;192.168.23.2;);
};

So you would have one block for example.com, and another for other-example.com each directed to load the appropriate zone file from disk.

Justin Scott
  • 8,798
  • 1
  • 28
  • 39
0

sorry every one it was an eager question i got the answer.

named.conf = zone "test.com" IN {
        type master;
        file "data/test.com.zone";
        allow-update { none; };
               };

and simillar with zone files as stated in file "test.com.zone" inside data directory..

tike
  • 643
  • 1
  • 5
  • 18