Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: net::dns::update and ??

by traveler (Parson)
on Nov 04, 2002 at 18:06 UTC ( #210235=note: print w/ replies, xml ) Need Help??

in reply to net::dns::update and ??

Some things to check:

  1. Do you have permission to update that zone (the zone)
  2. What are $host, $ip and $type? I guess the important one here is $type. Is it "PTR"?
  3. What is the value of $DnsDomain? Is it something like "" (with the ".")
  4. Finally, should the Update->new() call refer to $DnsDomain or $revZone? I am not sure as I have not used Net::DNS::Update.
HTH, --traveler

Comment on Re: net::dns::update and ??
Replies are listed 'Best First'.
Re: Re: net::dns::update and ??
by Anonymous Monk on Nov 05, 2002 at 10:26 UTC
    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 zones.
    i have tried syntax like those from "nsupdate" :
    update: {add} 86400 IN PTR
    but with no success ! (NOTZONE RETURN CODE from DNS-Server)

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

    by wolfgang
      I now believe that the issue is what I mentioned, you are not updating; you are updating 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( 3600 PTR

        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);

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-11-25 13:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (675 votes), past polls