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:22.214.171.124 Bcast:126.96.36.199 Mask:255.255.255.0
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
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:61450792 errors:0 dropped:0 overruns:0 frame:0
TX packets:3495473 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:4594115978 (4.5 GB) TX bytes:3452771236 (3.4 GB)
For other providers contact support for this support.
Prepare your web-server
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: http://kromey.us/2011/06/named-based-virtual-hosts-with-nginx-on-ipv6-423.html
By default Apache will listen IPv6, see below”
- Listen *
(Both IPv4 and IPv6 on every IP)
- Listen 192.168.0.100
- Listen Listen [2001:db8::a00:20ff:fea7:ccea]:80
These vhosts go in /etc/apache2/sites-enabled/nameofyourvhost.conf
Set a vhost on all IP’s (both IPv4 and IPv6).
1234567 <virtualhost *:80>ServerName fix6.netServerAlias *.fix6.netDocumentRoot /www/fix6.net/public_htmlErrorLog /www/fix6.net/logs/error_logCustomlog /www/fix6.net/logs/combined_log combined</virtualhost>
Set vhost to a specific IPv6 only
1234567 <virtualhost [2001:db8::a00:20ff:fea7:ccea]:80>ServerName fix6.netServerAlias *.fix6.netDocumentRoot /www/fix6.net/public_htmlErrorLog /www/fix6.net/logs/error_logCustomlog /www/fix6.net/logs/combined_log combined</virtualhost>
Set vhost to a specific IPv4 and IPv6 address
1234567 <virtualhost 192.168.1.100:80, [2001:db8::a00:20ff:fea7:ccea]:80>ServerName fix6.netServerAlias *.fix6.netDocumentRoot /www/fix6.net/public_htmlErrorLog /www/fix6.net/logs/error_logCustomlog /www/fix6.net/logs/combined_log combined</virtualhost>
Check IPv6 connection
Don’t forget to restart http service. Ensure that it listens on IPv6:80 port and firewall is open for it.
root@blog:~# netstat -ln | grep tcp
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
root@blog:~# netstat -ln | grep tcp
tcp6 0 0 :::80 :::* LISTEN
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:
a32.me. 163 IN AAAA 2001:4801:7817:72:147b:1f88:ff10:a31
Test and check
Test if your DNS zone was updated
~$ dig aaaa a32.me
; <<>> DiG 9.8.1-P1 <<>> aaaa a32.me
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64646
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;a32.me. IN AAAA
;; ANSWER SECTION:
a32.me. 300 IN AAAA 2001:4801:7817:72:147b:1f88:ff10:a31
;; Query time: 86 msec
;; SERVER: 188.8.131.52#53(184.108.40.206)
;; WHEN: Sat Dec 1 11:27:50 2012
;; MSG SIZE rcvd: 52
Click on link below to check your domain for full IPv6 support