DNRD Manual Page
dnrd - proxy name serverSYNOPSIS
- dnrd
- [-a localaddress | --address=localaddress] [-b | --load-balance] [-c (off|[low:]high) | --cache=(off|[low:]high)] [-d LEVEL | --debug=LEVEL] [-h | --help] [-i | --ignore] [-k | --kill] [-l | --log] [-m (off|hosts) | --master=(off|hosts)] [-M N | --max-sock=N] [-r N | --retry=N] [-s ipaddr(:domain) | --server=ipaddr(:domain)] [-t N | --timeout=N] [-u userid | --uid=userid] [-v | --version]
DESCRIPTION
dnrd is a proxying nameserver. It forwards DNS queries to the appropriate nameserver, but can also act as the primary nameserver for a subnet behind a firewall. Proxying is configured on the command line using the -s option. By default, dnrd will act as the primary nameserver for hosts found in /etc/hosts.OPTIONS
- -a
- --address
-
Bind only to the interface with the specified address. By default
dnrd binds to everything.
- -b
- --load-balance
-
Turn on load balancing. All forward servers that are specified after
this option (with
-s) will load balance in a round robin scheme. By default,
dnrd will use the next server in the list if the first times out. As soon
as the first is reactivated, it will be used again. With
-b
option, dnrd will use next active server as soon a request is
served. If a server times out it will be deactivated and will not be
used until it comes back. As soon it is reactivated it will join the
list.
Note that if there are no -s after the -b, this will do nothing at all.
- -c (off|[low:]high)
- --cache=(off|[low:]high)
-
This option can be used to either turn
off caching of DNS responses, or to change the
high and low watermarks. With the
high/low
water mark option, cached entries are purged when the number of
responses reaches the
high-water
mark, and they will be purged until the number of cached responses
reaches the
low-water
mark, purging the oldest first. By default, caching is on, with
low
and
high
water-marks of 800 and 1000 respectively.
- -d LEVEL
- --debug=LEVEL
-
This turns on debugging level
LEVEL.
The
dnrd
process will not fork into the background and print out debugging
information in the current console. Supported debug levels are 1-4
The higher level, the more debug info is printed.
The -l option can be used to force dnrd to run in the background and log debug info to syslog.
Sending signal SIGUSR1 will toggle the debug level between level 0 (no debugging) and level 3.
- -h
- --help
-
Prints usage information
- -i
- --ignore
-
Ignore cache for deactivated servers. If a forward DNS server times
out and gets deactivated, all cache entries for this server are
ignored. This helps avoid network timeout delays when
dnrd
serves a offline/dialup network.
- -k
- --kill
-
Kills the currently running
dnrd
process.
- -l
- --log
-
Send all messages to syslog.
dnrd
uses the deamon facility. If used with the
-d
flag, this option will cause
dnrd
to fork and run in the background, logging all debugging messages to
syslog.
- -m (off|hosts)
- --master=(off|hosts)
-
dnrd
can act as the primary name server for a number of hosts. By default,
it will read in
/usr/local/etc/dnrd/master
to determine how this is done. If that file
doesn't exist, it will act as the primary server for the hosts found in
/etc/hosts.
This option allows you to override the default behavior. Setting it to
off
turns off all primary server functionality. Setting it to
hosts
causes
dnrd
to act as the primary server for hosts in
/etc/hosts
regardless of whether it could find
/usr/local/etc/dnrd/master.
Sending the signal HUP to the dnrd process will cause the /usr/local/etc/dnrd/master file to be re-read. Since /etc/hosts is outside the chrooted envronment, dnrd will not be able to reread this file. Therefore it is not recommended to use /etc/hosts at all. Future versions of dnrd will not support any use of /etc/hosts.
- -M N
- --max-sock=N
-
Set the maximum allowed open sockets. Default is 200.
- -r N
- --retry=N
-
Set the retry interval time. When a forward DNS server times out it is
deactivated. (use the
-t
option to set the timeout value)
dnrd
will try to send a request for localhost every
N
seconds. As soon there are a respose from a deactivated server, it is
reactivated. The default value is
10
seconds. Setting this to zero will make
dnrd
to never deactivate a server.
- -s ipaddr(:domain)
- --server=ipaddr(:domain)
-
Add a forward DNS server. If multiple
-s
options are given,
dnrd
treats the first as a primary DNS server and the rest as backup
servers. If the primary DNS server times out, it is deactivated and
the next specified server (that is active) is used until the previous
gets reactivated.
The domain option allows dnrd to determine which DNS server should get the query based on the domain name in the query. This is useful when you have an internet connection and a vpn connection to work, for instance. Several servers with the same domain might be specified and then will they work as backup servers.
If -b option is specified, then will all servers specified after the -b option, be grouped by domain, and load balanced.
- -t N
- --timeout=N
-
Set the timeout value for forward DNS servers. If a server don't
respond to a query within
N
seconds it is deactivated. The default value is
12
Setting this to zero will make dnrd to never deactivate a server because of timeouts. However, a server might be deactivated if sendto fails.
- -u userid
- --userid=userid
-
By default,
dnrd
switches to uid
65535
after starting up. This is a security feature. The default uid can be
overridden using this option.
userid
can either be a name or a number.
- -v
- --version
-
Prints out the version number.
BUGS
Sending -SIGHUP will not reread the /etc/hosts file since dnrd is chrooted to /usr/local/etc/dnrd. Use /usr/local/etc/dnrd/master instead and avoid using /etc/hosts at all.
FILES
/usr/local/etc/dnrd/master
This file is used to configure dnrd as a primary nameserver.
/etc/hosts
By default, dnrd will act as a primary nameserver for hosts found in this file. Note that this file will not be used at all in future versions.
/var/run/dnrd.pid
The currently-running dnrd process' pid is placed into this file. It is needed to allow new dnrd processes to find and kill the currently running process.
AUTHOR
The original version of dnrd was written by Brad Garcia garsh@home.com. Other contributors are listed in the HISTORY file included with the source code.