Is your site or WordPress blog ready for IPv6?

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:198.101.158.105  Bcast:198.101.158.255  Mask:255.255.255.0
          inet6 addr: 2001:4801:7817:72:147b:1f88:ff10:a31/64 Scope:Global
          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
          collisions:0 txqueuelen:1000
          RX bytes:4594115978 (4.5 GB)  TX bytes:3452771236 (3.4 GB)
          Interrupt:26
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: http://kromey.us/2011/06/named-based-virtual-hosts-with-nginx-on-ipv6-423.html

Configure Apache

By default Apache will listen IPv6, see below"
  • Listen *
(Both IPv4 and IPv6 on every IP)
  • Listen 192.168.0.100
(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>
   ServerName fix6.net
   ServerAlias *.fix6.net
   DocumentRoot /www/fix6.net/public_html
   ErrorLog /www/fix6.net/logs/error_log
   Customlog /www/fix6.net/logs/combined_log combined
 </virtualhost>
Set vhost to a specific IPv6 only
 <virtualhost [2001:db8::a00:20ff:fea7:ccea]:80>
    ServerName fix6.net
    ServerAlias *.fix6.net
    DocumentRoot /www/fix6.net/public_html
    ErrorLog /www/fix6.net/logs/error_log
    Customlog /www/fix6.net/logs/combined_log combined
 </virtualhost>
Set vhost to a specific IPv4 and IPv6 address
 <virtualhost 192.168.1.100:80, [2001:db8::a00:20ff:fea7:ccea]:80>
    ServerName fix6.net
    ServerAlias *.fix6.net
    DocumentRoot /www/fix6.net/public_html
    ErrorLog /www/fix6.net/logs/error_log
    Customlog /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. Before
root@blog:~# netstat -ln | grep tcp
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN

After
root@blog:~# 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: 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: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Dec 1 11:27:50 2012
;; MSG SIZE rcvd: 52
Click on link below to check your domain for full IPv6 support

http://a32.me/ipv6-site-check/

							

Leave a Reply

Your email address will not be published.