#
# Example config created by SilentRage @ www.dollardns.net
#
# Requires:
# http://www.dollardns.net/bind/named.ca
# http://www.dollardns.net/bind/views/basiczone.com.in
# http://www.dollardns.net/bind/views/basiczone.com.ex
#
################################################################################
# Global Server Configuration Defaults
#
options {
    #
    # Working directory from which all relative paths are based
    #
    directory "/var/named";

    #
    # Uncomment if you have a limited firewall that causes timeouts.
    # If you have multiple IPs, you may replace * with the preferred IP.
    #
    #query-source address * port 53;
    #notify-source * port 53;
    #transfer-source * port 53;

    #
    # Uncomment if you want statistics for your zones. The statistics will be
    # dumped the file you specify below when you execute 'rndc stats'.
    #
    #zone-statistics yes;
    #statistics-file "named.stats";
};

################################################################################
# Caching Server Configuration
#
view "network" {
    #
    # Handler for clients who exist on our local subnet(s) or loopback.
    #
    match-clients { localnets; localhost; };

    #
    # Lookup requests we are not authoritative for.
    #
    recursion yes;

    # FORWARD - Recommended for caching servers
    # Default: first
    # Values : first, only
    #
    # first: Query "forwarders" first, then resolve request ourself
    # only : Only query the "forwarders" to resolve requests
    #
    #forward first;

    # FORWARDERS - Required if "forward" is used
    # Default: (no forwarding)
    # Values : (addresslist)
    #
    # It is recommended that you use your ISP's caching server addresses
    # Example: forwarders { 127.0.0.1; 127.0.0.2; }
    #
    #forwarders { };

    #
    # Uncomment for fewer zone file hostname restrictions.
    # BIND 9.3.0 only 
    #
    #check-names master ignore;
    #check-names slave ignore;
    #check-names response ignore;

    #
    # Uncomment to solve issues with broken firewalls causing timeouts.
    # BIND 9.3.0 only
    #
    #edns-udp-size 512;

    #
    # Specify the root name servers
    #
    zone "." IN {
        type hint;
        file "named.ca";
    };

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

    #
    # The internal split for basiczone.com
    #
    zone "basiczone.com" IN {
        type master;
        file "basiczone.com.in";
    };
};

################################################################################
# Authoritative Server Configuration
#
view "internet" {
    #
    # Handler for anyone that doesn't match the above.
    #
    match-clients { any; };

    #
    # We are not a public resolver.
    #
    recursion no;

    #
    # Should BIND provide IP address information found in zones other than the
    # one that was queried?  Say yes if you trust the content of all of your
    # zones.
    #
    additional-from-auth yes;

    #
    # Should BIND provide answers gotten from cache?  By saying no, you refuse
    # to provide answers for zones you're not authoritative for.
    #
    additional-from-cache no;

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

    #
    # The external split for basiczone.com
    #
    zone "basiczone.com" IN {
        type master;
        file "basiczone.com.ex";
    };
};

################################################################################
# Logging Configuration
#
logging {
    #
    # Set up logging profiles for the query and activity logs
    #
    channel query_log {
        severity info;
        print-time yes;
	file "query.log" size 100M;
    };
    channel activity_log {
        severity info;
        print-time yes;
        print-category yes;
        print-severity yes;
        file "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; }; # BIND 9.3.0 only

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