Dynamic DNS with Dual-Stack IPv4/IPv6

1

1

In the past, I have been providing services (i.e. HTTP, VPN, etc.) on my network via port forwarding. Each service has its own domain name (i.e. home.domain.name, deluge.domain.name, vpn.domain.name, etc), and run on distinct machines within the network. A dynamic DNS client is run on the router to update home.domain.name and the other subdomains are simply CNAMEs of home.domain.name. My zone is managed via CloudFlare.

Now, I am given 1 IPv4 address (/32) and 1 IPv6 network (/48) assigned via DHCPv6-PD. My router (which runs OpenWRT Trunk) sends out router advertisements (RA) to let computers on my network know about the assigned IPv6 prefix. Configuration of global addresses within the network is done via stateless configuration. Therefore, while each machine shares the same global IPv4 address, they have distinct IPv6 addresses.

Hence, I can no longer use a CNAME.

One solution I have thought of is to write a dynamic DNS client that runs on each machine providing the service. However, I'd prefer to have the router do it as it is able to listen for changes in network state on the WAN side, so my client does not have to poll the CloudFlare API.

I am wondering if anyone has a better, centralized solution to solve this.

yjwong

Posted 2013-12-26T13:52:53.527

Reputation: 1 383

A6 records (RFC 2874, July 2000) were pretty much intended to solve this, but for a number of reasons never saw wide use and were moved to historic status by RFC 6563 in March 2012. They would have been useful because A6 RRs support chaining so you'd only need to store the actual network prefix once and all others could refer to it. – a CVn – 2013-12-26T15:22:11.703

Answers

1

If you want to run services on those machines it is much easier to give them fixed IPv6 addresses and put those in DNS. Then you don't need to update the records at all.

I assume your ISP is sane enough you give you the same IPv6 prefix every time. They should give you more than a /64 though. A /48 or a /56 is the normal so that you can have multiple subnets (like a guest network, a DMZ for your servers etc.)

Sander Steffann

Posted 2013-12-26T13:52:53.527

Reputation: 4 169

Very unfortunately, my ISP is not very sane. I have a dynamic prefix so this isn't an ideal solution either. I just re-checked my prefix length - it's a /48, I made a mistake. Corrected my question to reflect this. – yjwong – 2013-12-29T09:32:09.290

The /48 is good. Too bad it changes all the time. I don't know of a better solution than to run dynamic DNS updaters on every machine separately :( – Sander Steffann – 2013-12-30T07:32:01.180