Configuring Apache and Bind to support IPv6

Once the basic network connectivity was running, I enabled Apache to support IPv6.

First I added an IPv6 only interface on the VBox Host Internal Network in the Ubuntu server.  The address of this interface is: fdc1:e1f2:425d:2:a00:27ff:fec8:8380

Next I added the following line blow the NameVirtualHost *:80 statement in the /etc/apache2/ports.conf file:

NameVirtualHost *:80
Listen [fdc1:e1f2:425d:2:a00:27ff:fec8:8380]:80

Once the file was updated, I restarted the Apache2 daemon with:

cbroccoli@ubuntuserver:$ sudo apachectl start

Entering netstat -a should show the www service running.  If the interface is not up or if the router is not up, then the apache daemon will not start.

Additionally, bind needs to support AAAA records so that the web server can be accessed by name.

Here I added the following lines to named.conf.local:

zone "broccolifamily.net" { 
 type master;
 file "/etc/bind/db.broccolifamily.net";
 notify no;
 };

Then I added/updated the associated zone file and restarted the bind process:

sudo /etc/init.d/bind9 reload

Everything is working.  nslookup from Windows7 has the following output:

C:\Windows\system32>nslookup www6.broccolifamily.net
Server:  UnKnown
Address:  fdc1:e1f2:425d:2:a00:27ff:fec8:8380
Name:    www6.broccolifamily.net
Address:  fdc1:e1f2:425d:2:a00:27ff:fec8:8380

With Ubuntu, nslookup by itself doesn’t work.  You need to use the -type=AAAA option to get an address back… nslookup -type=AAAA www6.broccolifamily.net.  Putting the name into a browser, however, works without any problems.

Leave a Reply