NAME

Net::DNSServer::Proxy - Forwards requests to another DNS server

SYNOPSIS

  #!/usr/bin/perl -w -T
  use strict;
  use Net::DNSServer;
  use Net::DNSServer::Proxy;

  my $resolver = new Net::DNSServer::Proxy {
    # Which remote server to proxy to
    real_dns_server => "12.34.56.78",
    # Seconds to wait for its response
    patience => 2,
  };

    -- or --

  # real_dns_server will default to the first
  # "nameserver" entry in /etc/resolv.conf.
  # patience will will default to
  # $Net:DNSServer::Proxy::default_response_timeout.
  my $resolver = new Net::DNSServer::Proxy;

  run Net::DNSServer {
    priority => [$resolver],
  };

DESCRIPTION

This resolver does not actually do any resolving itself. It simply forwards the request to another server and responds with whatever the response is from other server.

new

The new() method takes a hash ref of properties.

real_dns_server (optional)

This value is the IP address of the server to proxy the requests to. This server should have a nameserver accepting connections on the standard named port (53). It defaults to the first "nameserver" entry found in the /etc/resolv.conf file.

patience (optional)

Number of seconds to wait for a response from real_dns_server before timing out. It defaults to $Net:DNSServer::Proxy::default_response_timeout.

AUTHOR

Rob Brown, rob@roobik.com

SEE ALSO

Net::Bind::Resolv, Net::DNSServer::Base, resolv.conf(5), resolver(5)

COPYRIGHT

Copyright (c) 2002, Rob Brown. All rights reserved.

Net::DNSServer is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

$Id: Proxy.pm,v 1.13 2002/11/13 19:57:24 rob Exp $