Home | History | Annotate | Line # | Download | only in ns2
      1 /*
      2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
      3  *
      4  * SPDX-License-Identifier: MPL-2.0
      5  *
      6  * This Source Code Form is subject to the terms of the Mozilla Public
      7  * License, v. 2.0.  If a copy of the MPL was not distributed with this
      8  * file, you can obtain one at https://mozilla.org/MPL/2.0/.
      9  *
     10  * See the COPYRIGHT file distributed with this work for additional
     11  * information regarding copyright ownership.
     12  */
     13 
     14 acl accept { 10.53.0.2; };
     15 
     16 acl badaccept { 10.53.0.1; };
     17 
     18 key one {
     19 	algorithm @DEFAULT_HMAC@;
     20 	secret "1234abcd8765";
     21 };
     22 
     23 key two {
     24 	algorithm @DEFAULT_HMAC@;
     25 	secret "1234efgh8765";
     26 };
     27 
     28 options {
     29 	port @PORT@;
     30 	pid-file "named.pid";
     31 	listen-on { 10.53.0.2; };
     32 	listen-on-v6 { none; };
     33 	recursion no;
     34 	dnssec-validation no;
     35 };
     36 
     37 include "controls.conf";
     38 
     39 zone "." {
     40 	type hint;
     41 	file "../../_common/root.hint";
     42 };
     43 
     44 zone "normal.example" {
     45 	type primary;
     46 	file "generic.db";
     47 };
     48 
     49 zone "any.example" {
     50 	type primary;
     51 	file "generic.db";
     52 	allow-query { any; };
     53 };
     54 
     55 zone "none.example" {
     56 	type primary;
     57 	file "generic.db";
     58 	allow-query { none; };
     59 };
     60 
     61 zone "addrallow.example" {
     62 	type primary;
     63 	file "generic.db";
     64 	allow-query { 10.53.0.2; };
     65 };
     66 
     67 zone "addrnotallow.example" {
     68 	type primary;
     69 	file "generic.db";
     70 	allow-query { 10.53.0.1; };
     71 };
     72 
     73 zone "addrdisallow.example" {
     74 	type primary;
     75 	file "generic.db";
     76 	allow-query { ! 10.53.0.2; };
     77 };
     78 
     79 zone "aclallow.example" {
     80 	type primary;
     81 	file "generic.db";
     82 	allow-query { accept; };
     83 };
     84 
     85 zone "aclnotallow.example" {
     86 	type primary;
     87 	file "generic.db";
     88 	allow-query { badaccept; };
     89 };
     90 
     91 zone "acldisallow.example" {
     92 	type primary;
     93 	file "generic.db";
     94 	allow-query { ! accept; };
     95 };
     96 
     97 /* Also usable for testing key not allowed */
     98 zone "keyallow.example" {
     99 	type primary;
    100 	file "generic.db";
    101 	allow-query { key one; };
    102 };
    103 
    104 zone "keydisallow.example" {
    105 	type primary;
    106 	file "generic.db";
    107 	allow-query { ! key one; };
    108 };
    109