# gentoo bind dns rpz-zone

## stijn.verbeeck

hi,

i tried to config bind as cache server with the option "response-policy".

Caching works fine, but when i tried to ping (or dig) to a domain thas is declared in de RPZ-zone, i get not the response from the rpz-zone but from the root name server.

my "named.conf" (etc/bind/named.conf)

```

//

// sample BIND configuration file

//

options {

  // tell named where to find files mentioned below

  directory "/var/bind";

  // on a multi-homed host, you might want to tell named

  // to listen for queries only on certain interfaces

  listen-on { 127.0.0.1; 192.168.1.0/24; };

  response-policy { zone "rpz"; };

//  forwarders {8.8.8.8;

//        }; 

   dnssec-validation auto;

                    

};

// The single dot (.) is the root of all DNS namespace, so

// this zone tells named where to start looking for any

// name on the Internet

zone "." IN {

  // a hint type means that we've got to look elsewhere

  // for authoritative information

  type hint;

  file "named.root";

};

// Where the localhost hostname is defined

zone "localhost" IN {

  // a master type means that this server needn't look

  // anywhere else for information; the localhost buck

  // stops here.

  type master;

  file "zone.localhost";

  // don't allow dynamic DNS clients to update info

  // about the localhost zone

  allow-update { none; };

};

// Where the 127.0.0.0 network is defined

zone "0.0.127.in-addr.arpa" IN {

  type master;

  file "revp.127.0.0";

  allow-update { none; };

};

 zone "rpz" IN {

 type master;

 file "/var/bind/safesearch.google";

 allow-query {192.168.1.0/24;};

 };

```

and my local rpz (/var/bind/safesearch.google) file is 

```

$TTL 60

@   IN   SOA   localhost. root.localhost. (

         201503024

         3H

         1H

         1W

         1H )

             IN    NS    localhost.

    

www.yahoo.com      CNAME   .

weather.yahoo.com   CNAME *.

patat.be      CNAME   google.com.

ad.yahoo.com        A    127.0.0.1

```

what is wrong?

----------

## Looping81

Hi,

Same result for me and i don't know why...

Did you have found the reason ?

Thanks  :Wink: 

Loop

----------

