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


Net-DNSServer documentation  | view source Contained in the Net-DNSServer distribution.

Index


NAME

Top

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

SYNOPSIS

Top

  #!/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

Top

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

Top

Rob Brown, rob@roobik.com

SEE ALSO

Top

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

COPYRIGHT

Top


Net-DNSServer documentation  | view source Contained in the Net-DNSServer distribution.