Setting up an IPv6 Bind DNS Server on Linux
If the DNS server isn’t installed on your Linux box, install it with the following command:
yum groupinstall "DNS Name Server"
We need to configure two things. First we need to specify the domains we’re going to resolve in named.conf. We will resolve the labplan.southpark domain.
Our DNS server will support both direct (name->ip) and reverse (ip->name) resolution.
According to APNIC the use of ip6.int is deprecated in favor of ip6.arpa for
reverse resolutions. However, since many programs still use it, we’re going to define
the ip6.int version as well. We need to add the following lines to named.conf:
zone "labplan.southpark" IN {
type master;
file "labplan.southpark.zone";
};
//deprecated
zone "0.0.0.0.0.0.0.0.0.0.0.0.1.c.e.f.ip6.int" {
type master;
file"reverse-fec1_64i.IP6.INT";
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.1.c.e.f.ip6.arpa" {
type master;
file "reverse-fec1_64.IP6.ARPA";
};Next we have to fill the zone records. The information for direct resolutions is stored on labplan.southpark.zone:
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns6.labplan.southpark.
ns6 IN AAAA fec0::20c:29ff:fe8f:8f16
customer IN AAAA fec0::20c:29ff:feff:4b37
npserver IN AAAA fec0::20c:29ff:fe4a:fae0
an IN AAAA fec0::20c:29ff:feb4:bee2The PTR records used for reverse resolution are stored on reverse-fec1_64i.IP6.INT (deprecated ip6.int) and reverse-fec1_64.IP6.ARPA (recommended ip6.arpa). This is the ip6.arpa zone (to edit an ip6.int zone just replace arpa with int):
$TTL 3d ; Default TTL
@ IN SOA 0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. root (
200906170 ; Serial number (YYYYMMdd)
24h ; Refresh time
30m ; Retry time
2d ; Expire time
3d ; Default TTL
)
IN NS ns6.labplan.southpark.
7.3.b.4.f.f.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. IN PTR costumer.labplan.southpark.
0.e.a.f.a.4.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. IN PTR npserver.labplan.southpark.
2.e.e.b.4.b.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. IN PTR an.labplan.southpark.
6.1.f.8.f.8.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. IN PTR gw.labplan.southpark.
6.1.f.8.f.8.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. IN PTR ns6.labplan.southpark.From this moment on everything should work fine. We can check the name resolution with dig:
# dig @::1 -t AAAA npserver.labplan.southpark ;; QUESTION SECTION: ;npserver.labplan.southpark. IN AAAA ;; ANSWER SECTION: npserver.labplan.southpark. 86400 IN AAAA fec0::20c:29ff:fe4a:fae0
To check reverse resolution use dig’s -x flag:
#dig @::1 -x fec0::20c:29ff:fe4a:fae0 ;; QUESTION SECTION: ;0.e.a.f.a.4.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa.INPTR ;; ANSWER SECTION: 0.e.a.f.a.4.e.f.f.f.9.2.c.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.c.e.f.ip6.arpa. 259200 IN PTR npserver.labplan.southpark.
Get Jorge Martinez de Salinas delivered by email