Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: net::dns::update and in-addr.arpa ??

by Anonymous Monk
on Nov 05, 2002 at 10:26 UTC ( #210422=note: print w/ replies, xml ) Need Help??


in reply to Re: net::dns::update and in-addr.arpa ??
in thread net::dns::update and in-addr.arpa ??

Hi, thanks so far - but i think I have to explain my problem in more detail:
I use the examples from net::dns::update. Adding or deleting A records works great!
But there are no examples how to write PTR records to in-addr.arpa zones.
i have tried syntax like those from "nsupdate" :
update: {add} 13.13.168.192.in-addr.arpa. 86400 IN PTR testhost.foo.com.
but with no success ! (NOTZONE RETURN CODE from DNS-Server)

here is my example without variables:

. my $update = Net::DNS::Update->new(foo.com); $update->push("pre", nxrrset("3.13.168.192.in-addr.arpa. PTR testhost. +foo.com.")); $update->push("update", rr_add("$3.13.168.192.in-addr.arpa. 86400 IN P +TR testhost.foo.com.")); my $res = Net::DNS::Resolver->new; $res->nameservers(nameserver.foo.com); my $reply = $res->send($update); .
answers to the questions:
as far as i know there shold be a "dot" after the domain name (testhost.foo.com.)
Net::DNS::Update->new should refer to den DNS domain
there are no right problems...

by wolfgang


Comment on Re: Re: net::dns::update and in-addr.arpa ??
Download Code
Re: Re: Re: net::dns::update and in-addr.arpa ??
by traveler (Parson) on Nov 05, 2002 at 14:46 UTC
    I now believe that the issue is what I mentioned, you are not updating foo.com; you are updating in-addr.arpa. Try making that the arg to new. Also I presume the $ before the IP is a typo?

    HTH, --traveler

      10 years later and I have this exact same problem. Can't figure out how to add a PTR record using Net::DNS. I wonder if OP ever figured this out...

      The syntax of my rr_add is: rr_add(X.XXX.XXX.XX.in-addr.arpa 3600 PTR hostname.mydomain.com.)

      Is this correct? Thanks in advance...
      # Create the update packet: my $update = Net::DNS::Update->new($OURDOMAIN); # Add the PTR record: $update->push(update => rr_add("$rev 3600 PTR $hst")); # Send the update to the zone's primary master. my $res = Net::DNS::Resolver->new; $res->nameservers("$OURNMSERV"); my $reply = $res->send($update);
        Resolved. Do a 'dig -x' on a valid IP address on the network. The "AUTHORITY SECTION" shows the in-addr.arpa zone to use for the 'new Net::DNS::Update' parameter.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://210422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2015-07-07 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls