NicTool icon indicating copy to clipboard operation
NicTool copied to clipboard

feat: add matching PTR for A & AAAA records

Open msimerson opened this issue 11 years ago • 3 comments

add an option to update PTR when editing A or AAAA records

(if reverse zone exists and user has permission to edit PTR)

msimerson avatar Jun 24 '14 19:06 msimerson

Hmm I thought the email in the mailing list was about the opposite. What I have is when creating the PTR record, automatically create the forward one; because we also have a small patch that tells us the first available IP in a reverse zone in NicTool. I will submit that one and will look into this one.

vtsingaras avatar Nov 24 '14 07:11 vtsingaras

Having the PTR automagically created/updated when adding/updating an A or AAA record would be a very helpful feature! :yum: I want to replace Webmin with NicTool at my work, but this would be a missing feature.

mathieumd avatar Dec 30 '16 12:12 mathieumd

I just noticed this in tinydns/export this line:

sub zr_aaaa {
    my $self = shift;
    my $r = shift or die;

    my $aaaa = $self->expand_aaaa( $r->{address} );

    # from AAAA notation (8 groups of 4 hex digits) to 16 escaped octals
    my $rdata = $self->pack_hex( join '', split /:/, $aaaa );

    $self->aaaa_to_ptr( $aaaa ) if 1 == 0; # TODO: add option to enable

    return $self->zr_generic( 28, $r, $rdata );
};

The TODO denotes a feature whereby removing the conditional would automatically create a PTR for every AAAA record.

This would be a security problem in cases where NicTool is used in a multi-tenant situation, but for single entities that use NicTool it would work just fine.

msimerson avatar Mar 16 '17 16:03 msimerson