Chapter 2. BIND on IPv6

Modern BIND 9 name servers include complete support for IPv6, which means not only handling queries that ask for the IPv6 addresses of a given domain name, but also responding to those queries over IPv6, as well as querying other name servers over IPv6.

Listening for Queries

By default, BIND 9 name servers won’t listen for queries that arrive on an IPv6 interface. To tell the name server to listen on an IPv6 interface, use the listen-on-v6 substatement. The simplest form of this substatement is:

options {
    listen-on-v6 { any; };
};

which instructs the name server to listen for queries on any IPv6 network interfaces configured on the host. If you need to be more selective, you can specify a particular interface or particular interfaces:

options {
    listen-on-v6 { 2001:db8:cafe:1::1; 2001:db8:cafe:2::1; };
};

You can even negate entries in the list and specify entire networks, in which case the name server will listen on any interface on the matching network. If you need your name server to listen on a port other than 53 (the default), specify it immediately after listen-on-v6. Here’s an example that incorporates all of these:

options {
    listen-on-v6 port 5353 { !2001:db8:cafe:1::1; 2001:db8:cafe::/64; };
};

This configures the name server to listen on port 5353 on all interfaces with IPv6 addresses on the network 2001:db8:cafe::/64 (that is, the Movie U. IPv6 network) except the address 2001:db8:cafe:1::1.

If you need to have your name server listen on multiple ports at ...

Get DNS and BIND on IPv6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.