1/* 2 * Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC") 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 13 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14 * PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17/* Id: named40.conf,v 1.2 2010/11/16 01:37:39 sar Exp */ 18 19controls { /* empty */ }; 20 21acl accept { 10.53.0.2; }; 22 23acl badaccept { 10.53.0.1; }; 24 25key one { 26 algorithm hmac-md5; 27 secret "1234abcd8765"; 28}; 29 30key two { 31 algorithm hmac-md5; 32 secret "1234efgh8765"; 33}; 34 35options { 36 port 5300; 37 pid-file "named.pid"; 38 listen-on { 10.53.0.2; }; 39 listen-on-v6 { none; }; 40 recursion no; 41}; 42 43include "../../common/controls.conf"; 44 45zone "." { 46 type hint; 47 file "../../common/root.hint"; 48}; 49 50zone "normal.example" { 51 type master; 52 file "normal.db"; 53}; 54 55zone "any.example" { 56 type master; 57 file "any.db"; 58 allow-query { any; }; 59}; 60 61zone "none.example" { 62 type master; 63 file "none.db"; 64 allow-query { none; }; 65}; 66 67zone "addrallow.example" { 68 type master; 69 file "addrallow.db"; 70 allow-query { 10.53.0.2; }; 71}; 72 73zone "addrnotallow.example" { 74 type master; 75 file "addrnotallow.db"; 76 allow-query { 10.53.0.1; }; 77}; 78 79zone "addrdisallow.example" { 80 type master; 81 file "addrdisallow.db"; 82 allow-query { ! 10.53.0.2; }; 83}; 84 85zone "aclallow.example" { 86 type master; 87 file "aclallow.db"; 88 allow-query { accept; }; 89}; 90 91zone "aclnotallow.example" { 92 type master; 93 file "aclnotallow.db"; 94 allow-query { badaccept; }; 95}; 96 97zone "acldisallow.example" { 98 type master; 99 file "acldisallow.db"; 100 allow-query { ! accept; }; 101}; 102 103/* Also usable for testing key not allowed */ 104zone "keyallow.example" { 105 type master; 106 file "keyallow.db"; 107 allow-query { key one; }; 108}; 109 110zone "keydisallow.example" { 111 type master; 112 file "keydisallow.db"; 113 allow-query { ! key one; }; 114}; 115 116 117