How I added IPv6 to this site

Adding IPv6 to my home system was actually pretty easy. My gateway router has been configured with a 6to4 tunnel pointing at my employer's 6to4 relay, giving me full access to the IPv6 Internet.

Because I'm using 6to4, I've got a full /48 I can play with here at home. My 6to4 prefix is 2002:CAAD:93D8::/48, of which I'm only using one subnet at this time. I know, still need to wire up the refrigerator, DVD, TV, mobile phone, and so on.

Setting up basic IPv6 on my Linux box

My home system runs Linux. IPv6 comes as part of most recent Linux distributions, so all that I had to do was switch it on. And that was easy: just go to /etc/sysconfig/network and add the line

    "NETWORKING_IPV6=yes" 
Rebooting the PC resulted in it automatically figuring out it is IP address via autoconfiguration, and the default gateway from neighbour discovery.

Setting up DNS and Name Resolution

I run named here, from the BIND distribution. Because I've got a small home network, I prefer to use names etc to look things up. For anything that my nameserver can't find, it goes out to the Internet, to my ISP's nameservers, and so on.

To allow IPv6 support in my named process, I went to /etc/named.conf and added:

  options {
    listen-on-v6 { any; };
  };
Restart named, and off we go. Of course, the other thing I had to do was set up forward and reverse zones for my private home domain for IPv6. That proved to be less than trivial, especially the reverse part, as IPv6 addresses are somewhat longer than IPv4.

For name resolution, I simply edited the /etc/resolv.conf file to include the address of my IPv6 nameserver. The example of my resolv.conf is here:

    nameserver 192.168.1.10
    nameserver 2002:caad:93d8:1:20d:61ff:fe17:fdb2
    search home
From now on, all clients will ask my nameserver for an address. First an IPv6 address will be offered back, if it exists, and if not, then an IPv4 address will be offered.

Setting up Apache Webserver

The Apache Webserver comes with IPv6 already built in. So enabling IPv6 transport support here was very simple too. Apache has "LISTEN" statements telling the server what IP address it should listen on. To enable IPv6, simply add the IPv6 address and port alongside the IPv4 one, as in this example here:

    Listen 192.168.1.10:80
    Listen [2002:caad:93d8:1:20d:61ff:fe17:fdb2]:80
Restart Apache, and the website now supports IPv6 connections.

Setting up Sendmail

Sendmail also comes with IPv6 already built in, although the default if you compile from scratch is still not to include IPv6 support - bad sendmail.org! And enabling sendmail to support IPv6 is not well documented either; indeed I'd say that most of the public documentation is plain wrong. To enable sendmail to support IPv6 transport too, edit the /etc/mail/sendmail.mc file and simply comment out the line reading:

    DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
which is the line you would have for a standard IPv4 host, and replace it with
    DAEMON_OPTIONS(`port=smtp,Addr=::, Name=MTA-v6, Family=inet6')dnl
which enables IPv6 transport. And the IPv4 transport still works too. Restarting sendmail will cause the configuration file to be rebuilt, and sendmail will now be supporting both IPv4 and IPv6 transports.

All the advice in the FAQs that I found seems to be wrong. (That advice said to leave the IPv4 part in, and simply include the IPv6 part as well. But that results in lots of

 sendmail[1469]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v6: cannot bind: Address already in use 
errors in the /var/log/maillog file, basically saying that IPv6 isn't working because of a conflict with something already running.

Secure Shell, Mozilla, etc

I didn't have to do anything here. Now that the resolver has an IPv6 nameserver listed, it simply provides all the clients, such as SSH, Mozilla, etc with an IPv6 address if it exists, otherwise an IPv4 address. And it all just works.

Summary

And that is it, really very simple. If you stumble across this, and it works for you too, great. If not, I'm sorry, but as usual, your mileage may vary. The above worked for me.