
c0t0d0
New User
Feb 3, 2012, 11:12 AM
Post #1 of 2
(19857 views)
|
|
Create PTR Record using Net::DNS
|
Can't Post
|
|
First, the relevant xkcd comic: http://xkcd.com/979/ Next, the 10-year old thread on PerlMonks: http://www.perlmonks.org/?node_id=210422 Basically, I'm failing in my attempts to use Net::DNS::Update to create a PTR record and I'd like to see how others have manged this. Below is what I'm trying. $hst is the hostname that I already have an A record for. $rev is the backwards IP address in-addr.arpa thingy.
# 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");
|