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

Prepare your web-server

Configure NGINX

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.

Configure Apache

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

1

2

3

4

5

6

7

<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

1

2

3

4

5

6

7

<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

1

2

3

4

5

6

7

<virtualhost192.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

1

2

3

4

root@blog:~# netstat -ln | grep tcp

tcp000.0.0.0:800.0.0.0:*LISTEN

<strong>After</strong>

1

2

root@blog:~# netstat -ln | grep tcp

tcp600:::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: