【发布时间】:2012-02-04 06:26:57
【问题描述】:
一、相关xkcd漫画:http://xkcd.com/979/
接下来,PerlMonks 上已有 10 年历史的帖子:http://www.perlmonks.org/?node_id=210422
基本上,我在尝试使用 Net::DNS::Update 创建 PTR 记录时失败了,我想看看其他人是如何处理这个问题的。
以下是我正在尝试的。 $hst 是我已经有 A 记录的主机名。 $rev 是 in-addr.arpa 的后向 IP 地址。
# 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");
【问题讨论】: