The last few days I’ve been busy implementing IPv6 on some of our servers. Most software supports IPv6 out of the box like BIND, PowerDNS, Postfix, Apache, etc, etc. I’ve configured IPv6 on all of our machines and it all works like a charm. However, all our customer’s sites are hosted on machines which run the Parallels Plesk control panel and Plesk does not support IPv6 at all. Even worse, the Plesk-customized packages like Courier have IPv6 disabled at compile time.
According to what I’ve found a standard Plesk 9 server (Linux) has IPv6 support for:
- BIND (Default package)
- Apache (Default package)
- Postfix (Default package, Exim does not support IPv6)
The only important package which lacks IPv6 support is Courier.
Plesk itself does not support IPv6 at all, but most of its daemons do. So I worked on implementing it myself with a little PHP script.
You can use this script to run every 1 to 5 minutes or so. What it does is scan the /var/www/vhosts/ directory for domains, check if the httpd.include file requires modification (to enable IPv6) and if it made changes it reloads your Apache configuration.
What you need to do next is:
- Add AAAA-records to your zonefiles
- Add a NameVirtualHost directive in your Apache configuration for the IPv6 address
- add “inet_protocols = all” to your /etc/postfix/main.cf to enable IPv6 in Postfix
- Have BIND listen to your IPv6 address (no details here, I dont use the Plesk DNS server)
And your ready to go!
If for some reason this script does not work for you, and everything goes foobar you can restore the original Plesk configuration files with a easy Plesk command:
This utility regenerates the vhost configuration files.
The script can be found here.
(Disclamer: I didn’t test it. It works for me. Quite possibly not the best piece of code you’ve ever seen).