Friday, October 30, 2015

IPv6 AAAA vs. CNAME for same domain name




I reach my home site through a DynDNS name, and also have tunneled IPv6 there.



In the DNS zone, I have:



myhomesite CNAME example.dyndns.org.


How do I simultaneously point "myhomesite" to an AAAA record? If I trivially make it



myhomesite CNAME example.dyndns.org.

myhomesite AAAA 2001:db8::1:2:3:4


the zone is invalid (CNAME and other data).



Can you suggest a way for having the CNAME record and the AAAA record visible behind the same domain name?



What I'm not looking for is an ".ipv6."-infixed record, which already is in place.


Answer



I copy from DNS for Rocket Scientists:





CNAME RRs cannot have any other RRs
with the same name, for example, a TXT
- well that was true until DNSSEC came along and in this case RRSIG, NSEC and
certain KEY RRs can now occupy the
same name.




Therefore what you want to do cannot be done using a CNAME. Use the CNAME to access your homesite via IPv4 and have a myhomesite-v6 AAAA record point to the IPv6 address




If you do not want such a solution, you have to implement a mechanism that updates your DNS zone each time your IP address changes with:



myhomesite IN A IPv4.add.ress
IN AAAA IPv6.add.ress


But that depends on the API (if any) that your DNS provider exports to you. For example if I had root access on the DNS server, I would periodically host -t a example.dyndns.org and use the output to update the zonefile with the IPv4 address for myhomesite.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...