# DollarDNS BIND 9.3.0 Configuration
# last updated: Mar 23, 2005
################################################################################
# Option Configuration Defaults
#
options {
    #
    # Working directory from which all relative paths are based
    #
    directory "/var/named";

    #
    # We're behind a firewall and multihomed, set sources
    #
    query-source address 216.117.186.93 port 53;
    notify-source 216.117.186.93 port 53;
    transfer-source 216.117.186.93 port 53;

    #
    # Default behavior for zones
    #
    notify no;
    allow-query { any; };
    allow-transfer { any; };

    #
    # Minimum refresh time for slave zones is 5 minutes
    # Maximum refresh time for slave zones is 1 day
    # Minimum retry time for slave zones is 5 minutes
    # Maximum retry time for slave zones is 1 day
    #
    min-refresh-time 300;
    max-refresh-time 86400;
    min-retry-time 300;
    max-retry-time 86400;

    #
    # Don't restrict what our clients can create
    #
    check-names master ignore;
    check-names slave ignore;
    check-names response ignore;

    #
    # Stay far away from any potential UDP size problems
    #
    edns-udp-size 512;

    #
    # BIND 9.3.0 is vulnerable.  Disable DNSSEC to work around
    #
    dnssec-enable no;

    #
    # Make sure that IXFR is tried before AXFR
    #
    provide-ixfr yes;
    request-ixfr yes;

    #
    # This is the default location of the stats file.
    #
    statistics-file "named.stats";
};

acl ddslave { 66.111.214.100; };

server 66.111.214.100 { transfer-format many-answers; };

################################################################################
# Caching Server Configuration
#
view "resolver" {
    match-destinations { 127.0.0.1; };
    recursion yes;

    #
    # We won't need statistics on local or guest zones
    #
    zone-statistics no;

    #
    # Split DNS for DollarDNS domains
    #
    zone "dollardns.com" IN {
        type master;
        file "dollardns.zone";
    };
    zone "dollardns.net" IN {
        type master;
        file "dollardns.zone";
    };
    zone "dollardns.org" IN {
        type master;
        file "dollardns.zone";
    };
    zone "dollardns.info" IN {
        type master;
        file "dollardns.zone";
    };

    # Guest account zones
    include "usr/guest/zones.conf";
};

################################################################################
# Authoritative Server Configuration
#
view "host" {
    match-destinations { 216.117/16; };
    recursion no;

    #
    # This is a public authoritative server.  Do not trust the cache or
    # other authoritative zones when generating the additional section.
    #
    additional-from-auth no;
    additional-from-cache no;

    #
    # We want statistics on public zones
    #
    zone-statistics yes;

    #
    # RFC 1537 recommended loopback zone
    #
    zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "127.0.0.rev";
    };

    # Client zones
    include "usr/users.conf";
};

################################################################################
# Logging Configuration
#
logging {
    #
    # Set up logging profiles for the query and activity logs
    #
    channel query_log {
        severity info;
        print-time yes;
	file "log/query.log" size 100M;
    };
    channel activity_log {
        severity info;
        print-time yes;
        print-category yes;
        print-severity yes;
        file "log/activity.log" size 100M;
    };

    #
    # Log all interesting categories to one of the log files
    #
    category queries         { query_log; };

    category default         { activity_log; };
    category xfer-in         { activity_log; };
    category xfer-out        { activity_log; };
    category notify          { activity_log; };
    category security        { activity_log; };
    category update          { activity_log; };
    category update-security { activity_log; };

    #
    # Dump all uninteresting messages
    #
    category network         { null; };
    category lame-servers    { null; };
};
