Cafaro.net is now on IPv6 with Linux, Apache, and WordPress

So I finally took the time and got www.cafaro.net up and running on IPv6. I’ve had the addresses for a while and getting Linux up and talking IPv6 is pretty straight forward. All you need is to add some lines like these to your ifcfg-ethX file:

IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6ADDR=XXXX:XXXX:XXXX::XXXX:XXXX/64
IPV6_DEFAULTGW=XXXX:XXXX:XXXX::XXXX:1

And of course, can’t forget to setup ip6tables to match what iptables is blocking!

Getting Apache up on it was a little more fun. I’ve got some virtual hosts spread about so I basically had to find every reference to my sites IP address and duplicate all relevant configs, swapping the IPv4 addresses (like 192.1.1.1) with a bracketed IPv6 addresss (like [1922:1::1]). Examples would be:

Listen [1922:1::1:2]:80
or
NameVirtualHost [1922:1::1:2]:80
or
VirtualHost [1922:1::1:2]:80

What was the real bear was WordPress and plugins. See once I had this all setup and running for Apache, Apache wanted to talk to the world via IPv6 (IPv4 is still there, just less favored)! Of course, WordPress and akismets servers don’t do IPv6 and things broke. To fix a lot of this I had to enter in /etc/hosts entries specifically for wordpress and akismets servers. Here are some examples of my entries:

UPDATE The below are no longer needed and will break things, wordpress.org can be added for feed news

72.233.56.138 api.wordpress.org
66.150.40.250 wordpress.org
66.135.58.62 rest.akismet.com YOURKEY.rest.akismet.com
72.233.56.139 downloads.wordpress.org

With those in the hosts file, my system now defaults to IPv4 when those plugins try to do their behind the scenes checks. I also had to update the Dashboard news feed to the updated URL which apparently changes since it was added to my WordPress install (they use a redirect on their server which again fails with IPv6).

After all that it’s now up and running. Next will be tackling postfix and email over IPv6, but that’s for another month…

About D-Caf

I'm a computer geek, what more is there to say?
This entry was posted in David, Linux, Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *