IPv6: AAAA records with Plesk the hackish way
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:
#!/bin/sh
echo “INSERT INTO dns_recs (displayHost, host, displayVal, val, type, dns_zone_id) VALUES (‘$1′, ‘$1′, ‘$2′, ‘$2′, ‘AAAA’, 2)” | mysql -u admin -p psash /root/dnsupdate.sh
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.
thanks for your info.
[...] This post was mentioned on Twitter by George K., Parallels Panel. Parallels Panel said: Good find! RT @kargig: experimentalworks » Blog Archive » IPv6: AAAA records with Plesk the hackish way http://ff.im/-po9Qd [...]
It works very well, but it will only show the plesk default page because the IPv6 doesn’t redirect to the domain.