Posadisrc
The posadisrc
file is the main configuration file for Posadis. It contains all Posadis configuration settings, and refers to other configuration files such as zone master files.
Location of Posadisrc
The default location for the posadisrc
file is /etc/posadisrc
for Unix, and Conf\posadisrc.txt
from the Posadis installation direcoty for Windows. You can specify a custom configuration file using the -c
command-line option of Posadis.
Format
The configuration file is basically just a plain text file. Each configuration option is on a separate, unindented line, followed by its configuration value. Everything after a ;
is ignored, so you can thus embed comments in your configuration files. If you want to assign multiple values to a configuration setting, either specify the command multiple times, or separate the values by commas:
For example, you can specify configuration options/commands like this:
Listen tcp/3000 ; listen to port 3000 for tcp Listen ::1 ; listen to ipv6 port 53 for tcp/udp
Or:
Listen tcp/3000, ::1 ; listen to tcp port 3000, ipv6 port 53
Settings
A list of all Posadis configuration settings follows. A word on the format of configuration settings: put quotes around text containing spaces; Numerical value shortcuts can be used.
Modules
Modules can be used to add functionality to Posadis; see Modules for details. References to modules shipped with Posadis itself can be found in the index.
- libdir (file name) - Specify an additional directory to look in for libraries. Posadis looks by default in the
lib/posadis
subdirectory of your installation prefix, usually/usr/local
or/usr
for Unix.
- loadmodule (string) - Load a Posadis module.
You will need to tell Posadis where the root nameservers are, because Posadis doesn’t know them itself. This can be done by the “cache-ns” setting. Basically, you’ll just want to copy this if you want to use the standard root nameserver of the ICANN (as of january 2003):
Cache configuration
Posadis can act as a caching DNS server for your network; see the Caching in Posadis article for details and examples. The caching/forwarding behavior of Posadis is controlled by the following two settings:
- cache-ns - Set an initial list of auhoritative DNS servers for a domain. The
cache-ns
command is followed by the domain name to set the DNS servers for, and on the next lines, domain names and optionally IP numbers are specified.
- cache-forward - Set a list of DNS servers to forward requests to. The
cache-forward
command is followed by the domain name to set the forwarders for (these forwarders then apply to the domain and its subdomains), and, on the next lines, the IP numbers of the DNS servers. To disable forwarding for a domain, just include acache-forward
statement without any IP numbers.
Also, the following statements are available to control resolver behavior:
- recursion_acl (access control list) - Clients to allow recursive service for. Defaults to
any
.
- max_cache_items (number) - The maximum number of domain names stored in the cache. If new domain names are added, older ones will be removed to prevent breaking this limit. Defaults to
1000
.
- resolv_patience (number) - The number of operations taken at most to complete one recursive query (e.g. following aliases and looking up DNS servers). Applies to zones for which we do resolving for, only, and defaults to
15
.
- cache_statistics (
true
orfalse
) - If this is set to true, Posadis will periodically (that is, every 60 seconds) display statics about the cache: the number of domain names and records stored, and the number of cache hits/misses. Defaults tofalse
.
- initial_cache_files (filenames) - Specifies master files to initially populate the cache with. These files are looked for in the Posadis configuration directory. Initial cache files are not periodically reloaded.
- cache_to_file (
true
orfalse
) - If set totrue
, Posadis will keep the contents of its cache over reboots by saving the cache to disk when it quits, and reloading it when it boots. Defaults tofalse
.
General
- listen (list of IP numbers/ports) - Specifies interface(s) to listen to. You can specify an IP number (both IPv4 and IPv6), a port number (to listen on any IPv4 interface), or both (separated by a ‘#’). You can prefix this by
udp/
ortcp/
to listen to only UDP or TCP ports, respectively. By default, Posadis does not listen to any interfaces at all.
- configdir (filename) - The directory to look in for zone data and master files.
- update_ttl (time interval) - Interval after which to re-check zone files for changes when using the
zonefile
andallzonefiles
statements. Defaults to10m
(10 minutes).
- datadir (file name) - Directory to store temporary files in (nessecary both for serving and retrieving zone transfers).
- user (user name; Unix only) - User name to switch to after opening configuration files and binding to sockets. Note that master files should be readable by this user as well as root.
- group (group name; Unix only) - Group name to switch to after opening configuration files and binding to sockets.
Logging
- logfile (filename) - File to log messages in. By default, nothing is logged. Posadis for Unix will also log to syslog.
- logfile_per_day (
true
orfalse
) - If set to true, Posadis will create a new logfile each day at midnight (named according to the value of ‘logfile’, but with the data appended). Defaults tofalse
.
- do_query_logging (
true
orfalse
) - If set totrue
, Posadis will log each query (normal queries, zone transfers and NOTIFY messages) it receives. Useful for debugging purposes; defaults tofalse
.
Resources
- max_threads (number) - Maximum number of simultaneous threads. Defaults to 50.
- max_tcp_connections (number) - Maximum number of simultaneous TCP connections. By default set to -1, which means no limit. Of course, the max_threads limit applies to tcp connections as well.
- tcp_priority (access control list) - Hosts to always allow a TCP connection from.
- max_cname_recursion (number) - Maximum number of recursive aliases (CNAMEs) to follow. Defaults to ten, which should really be enough for any sane configuration.