unifi-ddns icon indicating copy to clipboard operation
unifi-ddns copied to clipboard

Add support for AAAA records

Open cyberpower678 opened this issue 1 year ago • 1 comments

Some ISPs only assign an IPv6 and no IPv4 IP to their customers. As a result this utility will fail to update anything at all when trying to assign a domain to it. This utility is useful beyond the realms of the Unifi gateways. I'm able to plug in the same update URLs into FritzBox's and those with IPv4 pass the updated record to CloudFlare successfully.

I have to routers that currently do not have IPv4, and their records are not being updated subsequently.

Would it be possible to implement AAAA support?

cyberpower678 avatar Jan 22 '24 17:01 cyberpower678

We could Ppotentially adding some conditional logic in the script to check for the submitted IP (looking for : character for example) to determine the type of record to create. If anyone wants to contribute a PR, I'd be happy to review and merge!

willswire avatar Feb 19 '24 14:02 willswire

Is this still needing implementation? The code seems to already look for AAAA records if the IP address doesn't contain a ..

https://github.com/willswire/unifi-ddns/blob/main/src/index.js#L35

async findRecord(zone, name, isIPV4 = true) {
  const rrType = isIPV4 ? "A" : "AAAA";

isAdrisal avatar Apr 19 '24 11:04 isAdrisal

I'm not seeing any AAAA records on my IPv6 only domains, despite the Dynamic DNS being set up for it. I've got 3 Fritz Boxes, 2 are IPv6 only and the last is IPv4 only. Only the IPv4 is sending updates.

cyberpower678 avatar Apr 19 '24 11:04 cyberpower678

Are the two IPv6 domains using subdomains? There's a note in the readme that for IPv4 subdomains, the A record needs to be created manually first. Perhaps it's similar for AAAA?

isAdrisal avatar Apr 19 '24 12:04 isAdrisal

You might be right. I've created AAAA records for the two and pointed it to ::. Let's see if they actually populate.

cyberpower678 avatar Apr 19 '24 12:04 cyberpower678

Nope. It's not updating my records.

cyberpower678 avatar Apr 19 '24 13:04 cyberpower678

https://github.com/willswire/unifi-ddns/pull/67

This should fully implement the feature which should allow both IPv4 and IPv6 to be updated simultaneously.

cyberpower678 avatar Apr 20 '24 01:04 cyberpower678

Closed via #67

willswire avatar Apr 20 '24 21:04 willswire