1

I have a router named alice, and servers named bob and charlie. I want to be able to use IPv6 to go directly to alice, bob, or charlie, and I want IPv4 to continue to work, giving me alice's address so that it can use NAT to get to bob and charlie. Also, I have dynamic DNS.

So currently I have:

CNAME alice -> abcdef.dyndnsroutercompany.com
CNAME bob -> alice
CNAME charlie -> alice

now I want to add AAAA records for alice, bob, and charlie, but I can't, because they would conflict with the CNAME records. I can't even convert all the CNAME records to A records, because they are assigned dynamically by a third party.

Is there any DNS solution to this problem?

Currently my solution is to abandon IPv4 completely.

6
  • What's stopping you from selecting a DDNS provider that does what you need (it might be out there!) or even implementing one yourself? It's not trivial, but it's not hard either.
    – Daniel B
    Commented Mar 5, 2023 at 10:52
  • See this answer, but it's perhaps not a good solution.
    – harrymc
    Commented Mar 5, 2023 at 11:11
  • @DanielB I've implemented my own before, yes, it's not very hard. But I believe my question still stands.
    – Nacht
    Commented Mar 6, 2023 at 0:32
  • @harrymc That seems to be exactly replicating my question. Perhaps I should close this one as a dupe of that one.
    – Nacht
    Commented Mar 6, 2023 at 0:34
  • It's not on our site, so it's not a duplicate. Just wanted to know if you would think it a solution.
    – harrymc
    Commented Mar 6, 2023 at 8:07

1 Answer 1

1

This subject was treated in the ServerFault article of IPv6 AAAA vs. CNAME for same domain name.

The accepted answer by adamo is quoted here :

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .