- 论坛徽章:
- 0
|
it's simple code to setup a dns server based on Net::DNS::Nameserver. :)
my $ns = Net::DNS::Nameserver -> new(
LocalAddr => [ '127.0.0.1' ],
LocalPort => 53,
ReplyHandler => \&reply_handler,
Verbose => 0,
) || die "couldn't create nameserver object\n";
$ns->main_loop;
example code copy from Net::DNS::Nameserver module documentation.
I know Stanford-DNSserver, but never tested. do you thing it's better than Net::DNS::Nameserver? In the pass, I just use this dns for internal query by squid to point to the right backend.
now, I want to make the dns smart. :) |
|