in reply to testing a DNS server

A simple example using Net::DNS:

use strict; use warnings; use Net::DNS; my $server = '127.0.0.1'; # adjust as appropriate my $resolver = Net::DNS::Resolver->new(nameserver => $server); my $reply = $resolver->query("google.com","A"); if ($reply) { for my $answer ($reply->answer) { print $answer->address()."\n"; } }

You should be able to add tests as you see appropriate.

To be honest though, if you've got problems with your DNS server I'd suggest exchanging the server software. DNS should be a dead reliable service, and there are servers out there which you can just forget about once they're set up properly (my personal favourite is still djbdns, but there are others as well).


All dogma is stupid.