Score:-3

How can I setup two or multiple reverse zone for one IP with bind9?

vg flag

When I try to define reverse zone with same IP the as reverse zone named-checkconf throws:

$ named-checkconf named.conf.cust_zone
named.conf:63: zone '70.231.168.192.in-addr.arpa': already exists previous definition: named.conf:52                                                                                                             

My config file.

...
// zone for the 1st domain

zone "domain_1.com"{
    type master;    
    file "file"
}

// reverse zone for 1st domain 

zone "70.231.168.192.in-addr.arpa" {
    type master;
    file "file";                                                                                                                                                                   }

// zone for the 2nd domain

zone "domain_2.com"{
    type master;    
    file "file"
}

// reverse zone for 2nd domain 

zone "70.231.168.192.in-addr.arpa" {
    type master;
    file "file";
}
...

It works when I change one of the reverse zone name. But I am not sure would it work ?

So, is there are any way to configure two reverse zone for one IP ?

Patrick Mevzek avatar
cn flag
Reverse zones are exacly like forward zones. A zone is a zone, it can't appear twice. You have to combine all content into one. And normally the zone would be for part of the tree, not just the final record. AKA your zone should probably be more for `168.192.in-addr.arpa.`
Sanaf avatar
vg flag
Yes I know that, but if I have multiple zones and I've just one IP then what should I do ?
Patrick Mevzek avatar
cn flag
No you don't have multiple zones. Each node in the tree is unique, you can't have multiple time the same zone, that is meaningless (except if you implement split view). Your unique IP has one (or more, but mostly useless) `PTR` records, so you just define the zone needed to hold them. Also are you 100% sure you even need a reverse zone. This is almost never needed in fact, `PTR` records have usefulness only for mail configurations basically.
Sanaf avatar
vg flag
Basically I want setup two mail server in the same host. That's why I want to configure multiple zones. e.g: This is the first time I am trying to configure mail server. Please pardon my mistakes.
Patrick Mevzek avatar
cn flag
You have one zone, and in it one IP address (in reverse) with two `PTR` records for it, that is all. However you can not guarantee that all clients will take into account properly two `PTR` records. So you may want to smart small in order to better understand both DNS and email hosting, by just doing one mail server, and when you are 100% good with it, then you can think about the next steps.
Sanaf avatar
vg flag
Thank you for kind advice.
djdomi avatar
za flag
i flagged this question sue its offtopic imho.One IP, One PTR. you just duplicate the entry for the same ip. PTR is ip bound and not domain based to be easy said
Score:0
cz flag

You have listed the same zone twice in named.conf. Each zone can only appear once here.

Your comments seem to indicate that you think these are different zones, but they are exactly the same zone.

Remove the duplicate entry from named.conf.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.