named.conf revision 7d9c38e05205fbceaff07f2f2a8bc0cd8582a330
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * This is a worthless, nonrunnable example of a named.conf file that has
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * every conceivable syntax element in use. We use it to test the parser.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * It could also be used as a conceptual template for users of new features.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson# So are shell-style comments
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson 10.0.0.3; 1:2:3:4:5:6:7:8;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfer-source 10.0.0.5;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson directory "."; // use current directory
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson named-xfer "/usr/libexec/named-xfer"; // _PATH_XFER
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson dump-file "named_dump.db"; // _PATH_DUMPFILE
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson pid-file "/var/run/named.pid"; // _PATH_PIDFILE
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson statistics-file "named.stats"; // _PATH_STATS
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson memstatistics-file "named.memstats"; // _PATH_MEMSTATS
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson tcp-clients 143;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson recursive-clients 777;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson rfc2308-type1 no;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson tkey-dhkey "xyz" 666 ;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson check-names master fail;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson check-names slave warn;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson check-names response ignore;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson host-statistics no;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson deallocate-on-exit no; // Painstakingly deallocate all
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // objects when exiting instead of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // letting the OS clean up for us.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // Useful a memory leak is suspected.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // Final statistics are written to the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // memstatistics-file.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson datasize default;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson stacksize default;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson coresize default;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson files unlimited;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson recursion yes;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson expert-mode true; // don't issue warnings for some things
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson notify yes; // send NOTIFY messages. You can set
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson auth-nxdomain yes; // always set AA on NXDOMAIN.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson multiple-cnames no; // if yes, then a name my have more
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // than one CNAME RR. This use
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // is non-standard and is not
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // recommended, but it is available
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // because previous releases supported
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // it and it was used by large sites
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // for load balancing.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-query { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-transfer { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfers-in 10; // DEFAULT_XFERS_RUNNING, cannot be
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // set > than MAX_XFERS_RUNNING (20)
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfers-per-ns 2; // DEFAULT_XFERS_PER_NS
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfers-out 0; // not implemented
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-time-in 300; // MAX_XFER_TIME; the default number
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // of minutes an inbound zone transfer
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // may run. May be set on a per-zone
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-time-out 10; // MAX_XFER_TIME; the default number
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-idle-in 100; // MAX_XFER_TIME; the default number
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-idle-out 11; // MAX_XFER_TIME; the default number
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * The "transfer-format" option specifies the way outbound zone
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * transfers (i.e. from us to them) are formatted. Two values are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * one-answer Each RR gets its own DNS message.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * This format is not very efficient,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * but is widely understood. All
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * versions of BIND prior to 8.1 generate
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * this format for outbound zone
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * and require it on inbound transfers.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * many-answers As many RRs as will fit are put into
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * each DNS message. This format is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * the most efficient, but is only known
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * to work with BIND 8. Patches to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * BIND 4.9.5 named-xfer that enable it
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * If you are going to be doing zone transfers to older servers, you
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * shouldn't use 'many-answers'. 'transfer-format' may also be set
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * on a host-by-host basis using the 'server' statement (see below).
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * The "forward" option is only meaningful if you've defined
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * forwarders. "first" gives the normal BIND
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * forwarding behavior, i.e. ask the forwarders first, and if that
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * doesn't work then do the full lookup. You can also say
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * "forward only;" which is what used to be specified with
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * "slave" or "options forward-only". "only" will never attempt
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * a full lookup; only the forwarders will be used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson forwarders { }; // default is no forwarders
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Here's a forwarders example that isn't trivial
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson// topology { localhost; localnets; }; // prefer local nameservers
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Here's a more complicated topology example; it's commented out
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * because only one topology block is allowed.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson 10/8; // prefer network 10.0.0.0
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // 255.255.255.0 at all
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson { 1.2/16; 3/8; }; // like 1.2.0.0 netmask 255.255.0.0
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // and 3.0.0.0 netmask 255.0.0.0
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // equally well, but less than 10/8
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson listen-on port 53 { any; }; // listen for queries on port 53 on
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // any interface on the system
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // (i.e. all interfaces). The
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // "port 53" is optional; if you
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Multiple listen-on statements are allowed. Here's a more
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * complicated example:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson listen-on { 5.6.7.8; }; // listen on port 53 on interface
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson listen-on port 1234 { // listen on port 1234 on any
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson !1.2.3.4; // interface on network 1.2.3
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson 1.2.3/24; // netmask 255.255.255.0, except for
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson }; // interface 1.2.3.4.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Interval Timers
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson cleaning-interval 60; // clean the cache of expired RRs
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson interface-interval 60; // scan for new or deleted interfaces
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson statistics-interval 60; // log statistics every
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * IXFR options
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson maintain-ixfr-base no; // If yes, keep transaction log file for IXFR
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-ixfr-log-size 20; // Not implemented, maximum size the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // IXFR transaction log file to grow
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Control listeners, for "ndc". Every nameserver needs at least one.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson inet * port 52 allow { any; }; // a bad idea
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson unix "/var/run/ndc" perm 0600 owner 0 group 0; // the default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson type master; // what used to be called "primary"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson check-names fail;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-update { none; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-transfer { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-query { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // notify yes; // send NOTIFY messages for this
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // zone? The global option is used
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // if "notify" is not specified
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson also-notify { }; // don't notify any nameservers other
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson forwarders { 10.0.0.3; 1:2:3:4:5:6:7:8; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson type slave; // what used to be called "secondary"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson ixfr-base "slave.demo.zone.ixfr"; // File name for IXFR transaction log file
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfer-source 10.0.0.53; // fixes multihoming problems
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-time-in 120; // if not set, global option is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-time-out 1; // if not set, global option is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-idle-in 2; // if not set, global option is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-idle-out 3; // if not set, global option is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson also-notify { }; // don't notify any nameservers other
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // than those on the NS list for this
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson forwarders { 10.45.45.45; 10.0.0.3; 1:2:3:4:5:6:7:8; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonview "test-view" {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson file "view-zone-master";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson type stub; // stub zones are like slave zones,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // except that only the NS records
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // are transferred.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson 1.2.3.4; // where to zone transfer from
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson check-names warn;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-update { none; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-transfer { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-query { any; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson max-transfer-time-in 120; // if not set, global option is used.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson pubkey 257 255 1 "a useless key";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson pubkey 257 255 1 "another useless key";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson type hint; // used to be specified w/ "cache"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson// pubkey 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson "." 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonacl can_query { !1.2.3/24; any; }; // network 1.2.3.0 mask 255.255.255.0
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // is disallowed; rest are OK
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonacl can_axfr { 1.2.3.4; can_query; }; // host 1.2.3.4 and any host allowed
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson // by can_query are OK
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-query { can_query; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-transfer { can_axfr; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson allow-update {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson pubkey 666 665 664 "key of the beast";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonkey sample_key { // for TSIG; supported by parser
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson algorithm hmac-md5; // but not yet implemented in the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson secret "your secret here"; // rest of the server
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson algorithm hmac-md5;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson secret "ereh terces rouy";
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonacl key_acl { key sample_key; }; // a request signed with sample_key
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonserver 1.2.3.4 {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson bogus no; // if yes, we won't query or listen
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson transfer-format one-answer; // set transfer format for this
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson keys { sample_key key2 }; // for TSIG; supported by the parser
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson support-ixfr yes; // for IXFR supported by server
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * All log output goes to one or more "channels"; you can make as
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson channel syslog_errors { // this channel will send errors or
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson syslog user; // or worse to syslog (user facility)
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Channels have a severity level. Messages at severity levels
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * greater than or equal to the channel's level will be logged on
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * the channel. In order of decreasing severity, the levels are:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * critical a fatal error
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * notice a normal, but significant event
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * info an informational message
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * debug 1 the least detailed debugging info
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * debug 99 the most detailed debugging info
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Here are the built-in channels:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * channel default_syslog {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * syslog daemon;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * severity info;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * channel default_debug {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * file "named.run"; // note: stderr is used instead
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * // of "named.run" if the server
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * // is started with the "-f"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * severity dynamic; // this means log debugging
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * // at whatever debugging level
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * channel null { // this is the bit bucket;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * file "/dev/null"; // any logging to this channel
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * channel default_stderr { // writes to stderr
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * file "<stderr>"; // this is illustrative only;
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * // of saying "stderr" in the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * // configuration language.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * default_stderr only works before the server daemonizes (i.e.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * during initial startup) or when it is running in foreground
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * There are many categories, so you can send the logs
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * you want to see wherever you want, without seeing logs you
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * don't want. Right now the categories are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * default the catch-all. many things still
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * category, the default category is used
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * config high-level configuration file
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * parser low-level configuration file processing
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * queries what used to be called "query logging"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * lame-servers messages like "Lame server on ..."
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * panic if the server has to shut itself
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * down due to an internal problem, it
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * logs the problem here (as well as
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * eventlib debugging info from the event system
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * packet dumps of packets received and sent
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * cname messages like "XX points to a CNAME"
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson syslog_errors; // you can log to as many channels
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson category lame-servers { null; }; // don't log these at all
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson channel moderate_debug {
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson file "foo"; // foo
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson severity debug 3; // level 3 debugging to file
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson print-time yes; // timestamp log entries
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson print-category yes; // print category name
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson print-severity yes; // print severity level
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Note that debugging must have been turned on either
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * on the command line or with a signal to get debugging
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * output (non-debugging output will still be written to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * this channel).
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * If you don't want to see "zone XXXX loaded" messages but do
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * want to see any problems, you could do the following.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * You can also define category "default"; it gets used when no
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * "category" statement has been given for a category.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * If you don't define category default yourself, the default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * default category will be used. It is
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * category default { default_syslog; default_debug; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * If you don't define category panic yourself, the default
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * category panic { default_syslog; default_stderr; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * Two categories, 'packet' and 'eventlib', are special. Only one
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * channel may be assigned to each of them, and it must be a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * file channel. If you don't define them yourself, they default to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * category eventlib { default_debug; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson * category packet { default_debug; };
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson#include "filename"; // can't do within a statement