Score:0

Configuring Reverse DNS for an emulated DNS server hierarchy using BIND

cn flag

I'm emulating a network using Kathara (similar to Netkit) and I'm having trouble figuring out how to get reverse DNS to work across all three networks.

This is the topology

And this is the DNS hierarchy

I did manage to get recursive lookup to work. When queried for a name not in its database, ns.as1.net would query nsroot, then go down the hierarchy, finally getting a response from the authoritative server. I did this by adding a db.root file with a record for nsroot's address and using it for zone "."

named.conf:

[...]
zone "." {
    type hint;
    file "/etc/bind/db.root";
};
[...]

db.root:

.                   IN  NS    ROOT-SERVER.
ROOT-SERVER.        IN  A     1.1.2.2

My question is: How do I get it to work the same way for Reverse DNS?

I only managed to get it to work locally by configuring zone "3.3.in-addr.arpa" on ns.as3.net, but this way, it only works for the hosts that have ns.as3.net set as their resolver.

MTR in AS3:

                             My traceroute  [v0.93]
c2as3 (3.3.2.2)                                        2021-06-29T02:11:52+0000
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. r33.as3.net (3.3.2.1)             0.0%    12    0.1   0.1   0.1   0.2   0.0
 2. r32.as3.net (3.3.1.13)            0.0%    12    0.1   0.2   0.1   0.3   0.0
 3. ns.as3.net (3.3.4.2)              0.0%    11    0.2   0.2   0.2   0.2   0.0

MTR from AS2 to AS3:

                             My traceroute  [v0.93]
c1as2 (2.2.2.2)                                        2021-06-29T02:14:22+0000
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 2.2.2.1 (2.2.2.1)                 0.0%     7    0.1   0.1   0.1   0.2   0.0
 2. 2.2.1.9 (2.2.1.9)                 0.0%     6    0.1   0.1   0.1   0.1   0.0
 3. 2.2.0.2 (2.2.0.2)                 0.0%     6    0.2   0.1   0.1   0.2   0.0
 4. 3.3.1.6 (3.3.1.6)                 0.0%     6    0.2   0.2   0.2   0.2   0.0
 5. 3.3.4.2 (3.3.4.2)                 0.0%     6    0.2   0.2   0.2   0.3   0.0

I did think about adding every arpa zone in all nameservers, but I don't think it's the proper way to do it.

I would greatly appreciate any tips or help provided.

Score:0
us flag

As far as I see, you need to simulate a root hints NS server, because how else would the ns.as3.net know where to find the NS server responsible for the zone records for 1.1.in-addr.arpa and 2.2.in-addr.arpa?

Same applies for the two other name servers.

Disclaimer

The following written from a cell phone, so I haven't being able to verify grammar is correct, but you will hopefully get the idea. :-)

The alternative is of course you add a zone entry on ns.as3.net like:

zone "1.1.in-addr.arpa" {
  type forward;
  forwarders { x.x.x.x; }
  forward only;
};

zone "2.2.in-addr.arpa" {
type forward;
  forwarders { y.y.y.y; }
  forward only;
};

Replace x.x.x.x and y.y.y.y with the ip-adresse of the respective nameserver for as1.net and as2.net.

Similar entries need to be added to the other name servers, so all name servers knows where all zone records are located.

djdomi avatar
za flag
Does this Solve your Issue? https://serverfault.com/questions/833824/how-do-you-configure-bind-to-forward-reverse-dns-queries-to-another-dns-server?rq=1
us flag
Are you asking *me* or @rzv.th? I only suggest two ways out to get intended behaviour.
rzv.th avatar
cn flag
Thank you! I ended up using the forward method.
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.