Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 <file name="named.conf">
2 ##
3 ## @l_prefix@/etc/bind/named.conf -- BIND configuration
4 ##
6 controls {
7 unix "@l_prefix@/var/bind/named.ctl"
8 perm 0600 owner @l_ruid@ group @l_rgid@
9 keys { "rndc-key"; };
10 #inet 127.0.0.1 port 953
11 #allow { 127.0.0.1; }
12 #keys { "rndc-key"; };
13 };
15 include "@l_prefix@/etc/bind/rndc.key";
17 logging {
18 channel logfile {
19 file "@l_prefix@/var/bind/named.log";
20 severity info;
21 print-category yes;
22 print-severity no;
23 print-time yes;
24 };
25 category "default" { "logfile"; };
26 category "client" { "logfile"; };
27 category "config" { "logfile"; };
28 category "database" { "logfile"; };
29 category "delegation-only" { "logfile"; };
30 category "dispatch" { "logfile"; };
31 category "dnssec" { "logfile"; };
32 category "general" { "logfile"; };
33 category "lame-servers" { "logfile"; };
34 category "network" { "logfile"; };
35 category "notify" { "logfile"; };
36 category "queries" { "logfile"; };
37 category "resolver" { "logfile"; };
38 category "security" { "logfile"; };
39 category "update" { "logfile"; };
40 category "xfer-in" { "logfile"; };
41 category "xfer-out" { "logfile"; };
42 category "unmatched" { "null"; };
43 };
45 options {
46 pid-file "@l_prefix@/var/bind/named.pid";
47 directory "@l_prefix@/etc/bind/named.db";
48 statistics-file "@l_prefix@/var/bind/named.stats";
49 allow-query { any; };
50 allow-transfer { any; };
51 allow-recursion { 127.0.0.0/8; };
52 recursion yes;
53 transfers-in 10;
54 transfers-per-ns 2;
55 max-transfer-time-in 120;
56 transfer-format one-answer;
57 cleaning-interval 60;
58 interface-interval 60;
59 listen-on port 53 { 127.0.0.1; };
60 #query-source address 127.0.0.1 port *;
61 #transfer-source 127.0.0.1;
62 #notify-source 127.0.0.1;
63 };
65 zone "." IN {
66 type hint;
67 file "db.root";
68 };
70 zone "localhost" IN {
71 type master;
72 file "db.localhost";
73 notify no;
74 allow-update { none; };
75 allow-transfer { any; };
76 };
78 zone "0.0.127.in-addr.arpa" IN {
79 type master;
80 file "db.localhost.ipv4";
81 notify no;
82 allow-update { none; };
83 allow-transfer { any; };
84 };
86 zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
87 type master;
88 file "db.localhost.ipv6";
89 notify no;
90 allow-update { none; };
91 allow-transfer { any; };
92 };
94 </file>
95 <file name="rndc.conf">
96 ##
97 ## @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration
98 ##
100 options {
101 default-server localhost-unix;
102 };
104 server localhost-unix {
105 addresses { "@l_prefix@/var/bind/named.ctl"; };
106 key "rndc-key";
107 };
109 server localhost-inet {
110 addresses { 127.0.0.1; };
111 port 953;
112 key "rndc-key";
113 };
115 include "@l_prefix@/etc/bind/rndc.key";
117 </file>
118 <file name="named.db/db.root">
119 ;;
120 ;; db.root -- Internet Root Nameservers
121 ;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON 2011-02-06 BY db.root.sh!
122 ;;
124 . 99999999 IN NS A.ROOT-SERVERS.NET.
125 . 99999999 IN NS B.ROOT-SERVERS.NET.
126 . 99999999 IN NS C.ROOT-SERVERS.NET.
127 . 99999999 IN NS D.ROOT-SERVERS.NET.
128 . 99999999 IN NS E.ROOT-SERVERS.NET.
129 . 99999999 IN NS F.ROOT-SERVERS.NET.
130 . 99999999 IN NS G.ROOT-SERVERS.NET.
131 . 99999999 IN NS H.ROOT-SERVERS.NET.
132 . 99999999 IN NS I.ROOT-SERVERS.NET.
133 . 99999999 IN NS J.ROOT-SERVERS.NET.
134 . 99999999 IN NS K.ROOT-SERVERS.NET.
135 . 99999999 IN NS L.ROOT-SERVERS.NET.
136 . 99999999 IN NS M.ROOT-SERVERS.NET.
137 A.ROOT-SERVERS.NET. 99999999 IN A 198.41.0.4
138 A.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:503:ba3e::2:30
139 B.ROOT-SERVERS.NET. 99999999 IN A 192.228.79.201
140 C.ROOT-SERVERS.NET. 99999999 IN A 192.33.4.12
141 D.ROOT-SERVERS.NET. 99999999 IN A 128.8.10.90
142 E.ROOT-SERVERS.NET. 99999999 IN A 192.203.230.10
143 F.ROOT-SERVERS.NET. 99999999 IN A 192.5.5.241
144 F.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:500:2f::f
145 G.ROOT-SERVERS.NET. 99999999 IN A 192.112.36.4
146 H.ROOT-SERVERS.NET. 99999999 IN A 128.63.2.53
147 H.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:500:1::803f:235
148 I.ROOT-SERVERS.NET. 99999999 IN A 192.36.148.17
149 I.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:7fe::53
150 J.ROOT-SERVERS.NET. 99999999 IN A 192.58.128.30
151 J.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:503:c27::2:30
152 K.ROOT-SERVERS.NET. 99999999 IN A 193.0.14.129
153 K.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:7fd::1
154 L.ROOT-SERVERS.NET. 99999999 IN A 199.7.83.42
155 L.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:500:3::42
156 M.ROOT-SERVERS.NET. 99999999 IN A 202.12.27.33
157 M.ROOT-SERVERS.NET. 99999999 IN AAAA 2001:dc3::35
159 </file>
160 <file name="named.db/db.root.sh">
161 #!/bin/sh
163 ROOTFILE=./db.root
165 echo '@l_prefix@' | egrep '^@l_' | egrep 'prefix@$' >/dev/null
166 if [ $? -eq 0 ]; then
167 CURL='curl'
168 DIG='dig'
169 else
170 CURL='@l_prefix@/bin/openpkg curl'
171 DIG='@l_prefix@/bin/dig'
172 fi
174 date=`date '+%Y-%m-%d'`
175 cat >$ROOTFILE <<EOT
176 ;;
177 ;; db.root -- Internet Root Nameservers
178 ;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON $date BY db.root.sh!
179 ;;
181 EOT
183 $CURL -s -L ftp://ftp.internic.net/domain/named.root >$ROOTFILE.raw
184 for i in A B C D E F G H I J K L M; do
185 ${DIG} @$i.ROOT-SERVERS.NET . NS >>$ROOTFILE.raw
186 done
187 [ -f $ROOTFILE.raw ] || exit 1
188 awk <$ROOTFILE.raw '
189 /[ ]NS[ ]/ { printf("%-20s 99999999 IN NS %s\n", $1, toupper($NF)); }
190 /[ ]AAAA[ ]/ { printf("%-20s 99999999 IN AAAA %s\n", toupper($1), tolower($NF)); }
191 /[ ]A[ ]/ { printf("%-20s 99999999 IN A %s\n", toupper($1), tolower($NF)); }
192 ' |\
193 egrep -v '^;' |\
194 sort -u >>$ROOTFILE
195 echo "" >>$ROOTFILE
196 rm $ROOTFILE.raw
198 </file>
199 <file name="named.db/db.localhost">
200 ;;
201 ;; db.localhost -- zonefile for the forward mapping of the loopback network
202 ;;
204 $TTL 86400
206 @ IN SOA localhost. root.localhost. (
207 2001010101 ; SERIAL
208 6H ; REFRESH: Secondaries refresh
209 60M ; RETRY: Secondaries retry
210 1W ; EXPIRE: Maximum TTL of data (expiry)
211 1D ; MINTTL: Minimum TTL of data (expiry)
212 )
214 IN NS @
215 IN A 127.0.0.1
217 </file>
218 <file name="named.db/db.localhost.ipv4">
219 ;;
220 ;; db.localhost.ipv4 -- zonefile for the IPv4 reverse mapping of the loopback network
221 ;;
223 $TTL 86400
225 @ IN SOA localhost. root.localhost. (
226 2001010101 ; SERIAL
227 6H ; REFRESH: Secondaries refresh
228 60M ; RETRY: Secondaries retry
229 1W ; EXPIRE: Maximum TTL of data (expiry)
230 1D ; MINTTL: Minimum TTL of data (expiry)
231 )
233 IN NS @
234 1 IN PTR localhost.
236 </file>
237 <file name="named.db/db.localhost.ipv6">
238 ;;
239 ;; db.localhost.ipv6 -- zonefile for the IPv6 reverse mapping of the loopback network
240 ;;
242 $TTL 86400
244 @ IN SOA localhost. root.localhost. (
245 2001010101 ; SERIAL
246 6H ; REFRESH: Secondaries refresh
247 60M ; RETRY: Secondaries retry
248 1W ; EXPIRE: Maximum TTL of data (expiry)
249 1D ; MINTTL: Minimum TTL of data (expiry)
250 )
252 IN NS @
253 IN PTR localhost.
255 </file>