//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver 
// (as a localhost DNS resolver only). 
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on 
// caching-nameserver package upgrade.
//
options {
	listen-on port 53 { 127.0.0.1; 192.168.122.1; 192.168.4.1; 192.168.42.10; };
	listen-on-v6 port 53 { ::1; };
	directory 	"/var/named";
	dump-file 	"/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
	secroots-file	"/var/named/data/named.secroots";
	recursing-file	"/var/named/data/named.recursing";
	dnssec-enable no;
	dnssec-validation no;

	resolver-query-timeout 64;
	resolver-retry-interval 8;
	max-retry-time 64;

	managed-keys-directory "/var/named/dynamic";
	geoip-directory "/usr/share/GeoIP";

	pid-file "/run/named/named.pid";
	session-keyfile "/run/named/session.key";

	/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
	include "/etc/crypto-policies/back-ends/bind.config";

	//query-source    port 53;	
	//query-source-v6 port 53;
	allow-query     { localhost; 192.168.122.0/24; 192.168.4.0/24; 192.168.42.0/24; };
};

include "/etc/named.root.key";

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

view localhost_resolver {
	match-clients 	   { localhost; 192.168.122.0/24; 192.168.4.0/24; 192.168.42.0/24; };
	match-destinations { localhost; 192.168.122.0/24; 192.168.4.0/24; 192.168.42.0/24; };

	zone "." IN {
	     type hint;
	     file "named.ca";
	};
	
        zone "jvdspc" {  // my fake TLD localhost nickname
             type    master;
             file    "jvdspc.zone";
        };

	include "/etc/named.rfc1912.zones";

	zone "jvds.net" { // my local "domain"
             type    master;
             file    "jvds.net.zone";
        };
	
        zone "1.168.192.in-addr.arpa" { // my local "domain"
             type    master;
             file    "1.168.192.zone";
        };
	
	zone "jvdsph.net" { // my local "domain"
             type    master;
             file    "jvdsph.net.zone";
        };
	
        zone "4.168.192.in-addr.arpa" { // my local "domain"
             type    master;
             file    "4.168.192.zone";
        };
        zone "jvdsvm.net" { // my local "domain"
             type    master;
             file    "jvdsvm.zone";
        };
	
        zone "122.168.192.in-addr.arpa" { // my local VMs "domain"
             type    master;
             file    "122.168.192.zone";
        };
	
        response-policy    { zone "nasty"; };
	zone "nasty" {    // blacklist from http://someonewhocares.org, converted to RPZ zone!
             type    master;
             file    "internet.nasty.zone";
             allow-query {none;}; 
        };

        forwarders {	       
//	       172.16.15.254;
//	       212.36.35.18; 212.36.35.17;	       
               159.134.0.11; 159.134.0.12; // 192.168.1.1; 8.8.8.8;	       
//	       192.168.5.1;
//	       192.168.1.1;
//	       192.168.117.22; // Ludgate LAN
// 	       192.168.12.22;// Ludgate WiFi
//             192.168.0.254; // Pa's
//               192.168.43.1; // my default router (phone)	
     	};

	recursion  yes;				
};



































