Adding IPv6 addresses to a domain is usually quite simple. Instead of an A record, you hast have to add an AAAA record to your database that points to an IPv6 address. If you use a configuration tool like Plesk, adding those records might be a little bit more difficult, as Plesk – at least in the version my hoster uses – doesn’t allow me to add AAAA records. So here is a short tutorial how to add an AAAA record.
Plesk manages the DNS records in a database. We first need a way to insert AAAA records in the database. Luckily if this is done, we are almost finished as the script that generates the zone files, doesn’t do a doublecheck at all.
First of all login as root on your box. Then login to your mysql server using the ‘admin’ user:
# mysql -u admin -p psa
Now alter the table to allow AAAA records:
mysql> alter table dns_recs modify column type enum(‘NS’,'A’,'AAAA’,'CNAME’,'MX’,'PTR’,'TXT’,'SRV’,'master’,'none’) NOT NULL default ‘A’;
Downoad the dnsupdate.sh script from parallels website. You now just need to add an entry to your database using a INSERT statement and then run the dnsupdate. I wrote a extremly hackish and dangerous to use script for that:
echo “INSERT INTO dns_recs (displayHost, host, displayVal, val, type, dns_zone_id) VALUES (‘$1′, ‘$1′, ‘$2′, ‘$2′, ‘AAAA’, 2)” | mysql -u admin -p psa
Notice that I set the dns_zone_id explicitly. You have to check what id your zone has. If you write a more sophisticated script and like to share it, I would be interested.
Don’t forget the trailing dot!
# sh /root/insert-dns.sh ‘ipv6.experimentalworks.net.’ ’2a01:3332:2324:52aa::2′
Done. Your domain now points to the right IPv6 address.