octodns.zone.ns

Classes

GlueForInZoneNsZoneValidator(id[, sets])

Checks that NS records pointing to targets within the same zone have corresponding A or AAAA "glue" records.

MultiValueNsZoneValidator(id[, sets])

Checks that all NS records have at least two values.

NsTargetNotCnameZoneValidator(id[, sets])

Checks that NS records do not point to targets that are CNAMEs within the same zone.

class octodns.zone.ns.GlueForInZoneNsZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that NS records pointing to targets within the same zone have corresponding A or AAAA “glue” records. Without these address records, resolvers cannot follow the delegation because they would need to resolve the name server’s address using the very name servers they are trying to locate.

Example

  • Zone example.com. has NS ns1.example.com.

  • This validator ensures an A or AAAA record exists for ns1.example.com. within the example.com. zone.

Reference: https://datatracker.ietf.org/doc/html/rfc1033 (Operations)

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.ns.NsTargetNotCnameZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that NS records do not point to targets that are CNAMEs within the same zone. A CNAME target for NS is invalid because resolvers need the actual A/AAAA records to follow the delegation.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.

class octodns.zone.ns.MultiValueNsZoneValidator(id, sets=None)[source]

Bases: ZoneValidator

Checks that all NS records have at least two values. Having multiple name servers is a fundamental best practice for DNS redundancy and availability, both at the apex and for sub-delegations.

validate(zone)[source]

Validate a fully populated zone.

Parameters:

zone – The Zone to validate.

Returns:

list[ValidationReason] of reason objects; empty when valid.