CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions:
Create PTR Record using Net::DNS

 



c0t0d0
New User

Feb 3, 2012, 11:12 AM

Post #1 of 2 (28564 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.


Code
# 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");



c0t0d0
New User

Feb 7, 2012, 6:14 PM

Post #2 of 2 (28460 views)
Re: [c0t0d0] Create PTR Record using Net::DNS [In reply to] Can't Post

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.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives