You may have heard that current IP address space (4 billion of IPs)  is already fully assigned and there is no free ip addresses left. There is no big panic since ISP and hosting companies have some internal IP reserve. But this definitely leads to quicker deployment of IPv6 protocol.

The main issue is: IPv6 must be supported on both ends of connection: user-end and server-end. It is a classic chicken and egg problem, top few users use IPv6 ->  no IPv6 services exists and no services support IPv6 means, why should clients switch to it?

Since there is no IPv6 alternative, service owners must do a big first step and some of them did. Google, Amazon, Rackspace and many others added IPv6 as alternative to IPv4.

Is you site or blog ready to be accessible via IPv6? I think its time to think about it. I did a switch of my Wordpress based blog hosted on Rackspace and here is the story...

IPv4 and IPv6 are used simultaneously  so you do not loose any of your client. Adding support of new protocol allows all IPv6 clients have direct and better communication with your site.

# Get your IPv6 address

If you use RackSpace all work is already done, your address is already assigned, just type ifconfig and look for Scope:Global

eth0      Link encap:Ethernet  HWaddr bc:76:4e:10:0a:31
          inet addr:  Bcast:  Mask:
          inet6 addr: <strong>2001:4801:7817:72:147b:1f88:ff10:a31</strong>/64 <strong>Scope:Global</strong>
          inet6 addr: fe80::be76:4eff:fe10:a31/64 Scope:Link
          RX packets:61450792 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3495473 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4594115978 (4.5 GB)  TX bytes:3452771236 (3.4 GB)

For other providers contact support for this support.

# Prepare your web-server

Configure NGINX

In your default virtual host, change your listen 80 default_server; directive to listen [::]:80 default_server;. This relies upon your system using those hybrid ports

In all of your other virtual hosts, change your listen 80; directives to listen [::]:80;. If you had previously omitted the listen 80; directive (since that’s the default if not specified), you must now add the listen [::]:80; directive.

Note that you can do exactly the same thing with additional ports — I additionally have listen [::]:8080 default_server; in my default vhost, and listen [::]:8080 in my vhost that listens on that port.

Check more details here:

Configure Apache

By default Apache will listen IPv6, see below"
  • Listen *
(Both IPv4 and IPv6 on every IP)
  • Listen
(IPv4 Only)
  • Listen Listen [2001:db8::a00:20ff:fea7:ccea]:80
(IPv6 Only)

These vhosts go in /etc/apache2/sites-enabled/nameofyourvhost.conf Set a vhost on all IP’s (both IPv4 and IPv6).

 <virtualhost *:80>
   ServerAlias *
   DocumentRoot /www/
   ErrorLog /www/
   Customlog /www/ combined

Set vhost to a specific IPv6 only

 <virtualhost [2001:db8::a00:20ff:fea7:ccea]:80>
    ServerAlias *
    DocumentRoot /www/
    ErrorLog /www/
    Customlog /www/ combined

Set vhost to a specific IPv4 and IPv6 address

 <virtualhost, [2001:db8::a00:20ff:fea7:ccea]:80>
    ServerAlias *
    DocumentRoot /www/
    ErrorLog /www/
    Customlog /www/ combined

Check IPv6 connection

Don't forget to restart http service. Ensure that it listens on IPv6:80 port and firewall is open for it.


[email protected]:~# netstat -ln | grep tcp
tcp 0 0* LISTEN

[email protected]:~# netstat -ln | grep tcp
tcp6 0 0 :::80 :::* LISTEN

# Configure DNS

IPv6 works along IPv4 protocol and its handled by special AAAA DNS record. So when browser resolves domain name to IP address is looks for AAAA record and if it exists it connects to IPv6 address instead to A record.

Rackspace gives you a nice DNS manager to host all your zones absolutely FREE. So just add new AAAA record of IPv6 address from ifconfig output like this: 163 IN AAAA 2001:4801:7817:72:147b:1f88:ff10:a31

# Test and check

Test if your DNS zone was updated

~$ dig aaaa

; <<>> DiG 9.8.1-P1 <<>> aaaa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64646
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0


;; ANSWER SECTION:    300   IN     AAAA      2001:4801:7817:72:147b:1f88:ff10:a31

;; Query time: 86 msec
;; WHEN: Sat Dec 1 11:27:50 2012
;; MSG SIZE rcvd: 52
Click on link below to check your domain for full IPv6 support