dnscontrol icon indicating copy to clipboard operation
dnscontrol copied to clipboard

Cannot find Reverse Zones for /25 (other sizes maybe as well)

Open misilot opened this issue 1 year ago • 6 comments
trafficstars

Describe the bug dnscontrol will keep creating zones in R53 without it ever matching on them.

To Reproduce Steps to reproduce the behavior:

  1. Create new Reverse Zone in config
  2. dnscontrol --push
  3. See: Adding zone for 0/25.100.25.10.in-addr.arpa to route 53 account
  4. Run it again see
  5. Adding zone for 0/25.100.25.10.in-addr.arpa to route 53 account
  6. Check AWS, and see that you have multiple new reverse zones.

Expected behavior I would expect it to be created once, and allow me to add new PTR records to the reverse zone.

DNS Provider

  • AWS

Additional context Example configuration

D(REV('10.25.100.0/25'), NO_REGISTRAR,
    DnsProvider(AWS)
);

misilot avatar Feb 21 '24 20:02 misilot

CC @tresni (maintainer of the route53 provider)

tlimoncelli avatar Feb 21 '24 20:02 tlimoncelli

Does this happen with other domains? (i.e. non-reverse lookup domains)

tlimoncelli avatar Feb 21 '24 20:02 tlimoncelli

So I couldn't get it to create a new zone for a random domain, since I am thinking it is looking for a matching domain,

This is actually the full error

Adding zone for 0/25.100.25.10.in-addr.arpa to route 53 account ERROR: ERROR: Domain 0/25.100.25.10.in-addr.arpa not found in your route 53 account

misilot avatar Feb 21 '24 21:02 misilot

If I do the following, I get the same result:

D('0/25.100.25.10.in-addr.arpa', NO_REGISTRAR,
    DnsProvider(AWS)
);
Adding zone for 0/25.100.25.10.in-addr.arpa to route 53 account
ERROR: ERROR: Domain 0/25.100.25.10.in-addr.arpa not found in your route 53 account

misilot avatar Feb 22 '24 01:02 misilot

I wonder if it is because this is what AWS is showing? 0/25.100.25.10.in-addr.arpa

I am wondering if AWS needs to be 0-25.100.25.10.in-addr.arpa instead, but not finding any helpful documentation or examples from AWS yet.

misilot avatar Feb 22 '24 01:02 misilot

From: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html?icmpid=docs_console_unmapped#domain-name-format-hosted-zones

If the domain name includes any characters other than a to z, 0 to 9, - (hyphen), or _ (underscore), Route 53 API actions return the characters as escape codes. This is true whether you specify the characters as characters or as escape codes when you create the entity. The Route 53 console displays the characters as characters, not as escape codes.

I wonder if this is what is happening?

misilot avatar Feb 22 '24 14:02 misilot