Score:0

Are IPv6 forward and reverse maps required if they match the ipv4 addresses when using bind9?

us flag

Using bind 9.18, my named.conf has something like this:

zone "my-domain.com" {
  type master;
  file "/usr/local/etc/namedb/master/my-domain.com.zone";
};

zone "32/29.114.115.116.IN-ADDR.ARPA" {
  type master;
  file "/usr/local/etc/namedb/master/my-domain.com.rev";
};

In the zone file, both ipv4 and ipv6 addresses may be present, and may represent the same host:

my-domain.com. IN A 116.115.114.32
ns.my-domain.com.               IN A 116.115.114.32
my-domain.com. IN AAAA ::ffff:7473:7220
ns.my-domain.com.               IN AAAA ::ffff:7473:7220

Is it necessary to explicitly define the IPv6 AAAA record when it matches the IPv4 address?

My freebsd 12.4 bind 9.18 install has a single localhost-reverse file; there are two entries in named.conf referring to the same reverse file:

zone "127.in-addr.arpa" { type primary; file "/usr/local/etc/namedb/primary/localhost-reverse.db"; };
zone "0.ip6.arpa"   { type primary; file "/usr/local/etc/namedb/primary/localhost-reverse.db"; };

The reverse file looks like:

$TTL 3h
@ SOA localhost. nobody.localhost. 42 1d 12h 1w 3h
    NS  localhost.
1.0.0   PTR localhost.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 PTR localhost.

How would the above example for my-domain.com be expressed in a single reverse file?

I get something like this:

named.conf:
  zone "114.115.116.IN-ADDR.ARPA" {type master; file "..."; }
  zone "7.2.7.3.7.4.f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.arpa" {type master; file "..."; }
reverse-zone file:
  $TTL 3h
  @ SOA ns.my-domain.com. root.my-domain.com. 42 1d 12h 1w 3h
      IN  NS  ns.my-domain.com.
    32      IN      PTR     ns.my-domain.com.
    0.2     IN      PTR     ns.my-domain.com.

Would the above be correct?

Is it necessary to explicitly define the ipv6 reverse map when it matches the IPv4 address?

vidarlo avatar
ar flag
How can IPv6 reverse address match IPv4 reverse address? I don't understand the premise of the question.
Gary Aitken avatar
us flag
@vidarlo by match I mean use one of the ipv6 forms that embed the ipv4 addr, e.g. ::ffff:abcd:efgh or the equivalent for reverse.
Keith Langmead avatar
us flag
I'd echo @vidario with what do you mean? IPv4 and IPv6 are completely separate, they don't "match". At best if you had say `1.2.3.4` you might choose to set your v6 address as a:b:c:d:1:2:3:4, but that's purely for human convenience, they're not inheritently linked as far as the computer is concerned, and could just as well be set to point to completely different destinations.
Score:1
ar flag

Is it necessary to explicitly define the IPv6 AAAA record when it matches the IPv4 address?

It can't ever match an IPv4 address. The address format is simply different; IPv6 addresses are 128 bit; IPv4 32 bits. Furthermore, the lookup format ain't even the same.

How would the above example for my-domain.com be expressed in a single reverse file?

It can't be. Due to the different formats.

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.