diff --git a/bind/bind.spec b/bind/bind.spec index cb16ff3db7..0a14b703d7 100644 --- a/bind/bind.spec +++ b/bind/bind.spec @@ -48,13 +48,7 @@ Release: 20071005 # list of sources Source0: ftp://ftp.isc.org/isc/bind9/%{V_dist}/bind-%{V_dist}.tar.gz -Source2: db.root -Source3: db.root.sh -Source4: db.localhost -Source5: db.localhost.ipv4 -Source6: db.localhost.ipv6 -Source7: named.conf -Source8: rndc.conf +Source1: bind.txt Source9: rc.bind # build information @@ -174,22 +168,17 @@ Conflicts: powerdns %{SOURCE rc.bind} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ - # install a reasonable default configuration - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/etc/bind - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - %{SOURCE named.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/ - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - %{SOURCE rndc.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/ + # install default configuration %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/bind \ $RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - %{SOURCE db.localhost} \ - %{SOURCE db.localhost.ipv4} \ - %{SOURCE db.localhost.ipv6} \ - %{SOURCE db.root} \ - %{SOURCE db.root.sh} \ - $RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db/ + for name in `grep "^/d" -e "/<\/file>/,\$d" >tmp.txt + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + tmp.txt $RPM_BUILD_ROOT%{l_prefix}/etc/bind/$name + done # create an empty var directory %{l_shtool} mkdir -f -p -m 755 \ diff --git a/bind/bind.txt b/bind/bind.txt new file mode 100644 index 0000000000..e1bb5219ad --- /dev/null +++ b/bind/bind.txt @@ -0,0 +1,229 @@ + +## +## @l_prefix@/etc/bind/named.conf -- BIND configuration +## + +controls { + inet 127.0.0.1 port 953 + allow { 127.0.0.1; } + keys { "rndc-key"; }; +}; + +include "@l_prefix@/etc/bind/rndc.key"; + +logging { + channel logfile { + file "@l_prefix@/var/bind/named.log"; + severity info; + print-category yes; + print-severity no; + print-time yes; + }; + category "default" { "logfile"; }; + category "general" { "logfile"; }; + category "security" { "logfile"; }; + category "config" { "logfile"; }; + category "queries" { "logfile"; }; + category "update" { "logfile"; }; + category "notify" { "logfile"; }; + category "database" { "logfile"; }; + category "dnssec" { "logfile"; }; + category "resolver" { "logfile"; }; + category "xfer-in" { "logfile"; }; + category "xfer-out" { "logfile"; }; + category "dispatch" { "logfile"; }; + category "lame-servers" { "logfile"; }; + category "delegation-only" { "logfile"; }; +}; + +options { + pid-file "@l_prefix@/var/bind/named.pid"; + directory "@l_prefix@/etc/bind/named.db"; + statistics-file "@l_prefix@/var/bind/named.stats"; + allow-query { any; }; + allow-transfer { any; }; + transfers-in 10; + transfers-per-ns 2; + max-transfer-time-in 120; + transfer-format one-answer; + cleaning-interval 60; + interface-interval 60; + listen-on port 53 { 127.0.0.1; }; + #query-source address 127.0.0.1 port *; + #transfer-source 127.0.0.1; + #notify-source 127.0.0.1; +}; + +zone "." IN { + type hint; + file "db.root"; +}; + +zone "localhost" IN { + type master; + file "db.localhost"; + notify no; + allow-update { none; }; + allow-transfer { any; }; +}; + +zone "0.0.127.in-addr.arpa" IN { + type master; + file "db.localhost.ipv4"; + notify no; + allow-update { none; }; + allow-transfer { any; }; +}; + +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" { + type master; + file "db.localhost.ipv6"; + notify no; + allow-update { none; }; + allow-transfer { any; }; +}; + + + +## +## @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration +## + +options { + default-server 127.0.0.1; + default-port 953; + default-key "rndc-key"; +}; + +server localhost { + key "rndc-key"; +}; + +include "@l_prefix@/etc/bind/rndc.key"; + + + +;; +;; db.root -- Internet Root Nameservers +;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON 2007-10-05 BY db.root.sh! +;; + +. 99999999 IN NS A.ROOT-SERVERS.NET. +. 99999999 IN NS B.ROOT-SERVERS.NET. +. 99999999 IN NS C.ROOT-SERVERS.NET. +. 99999999 IN NS D.ROOT-SERVERS.NET. +. 99999999 IN NS E.ROOT-SERVERS.NET. +. 99999999 IN NS F.ROOT-SERVERS.NET. +. 99999999 IN NS G.ROOT-SERVERS.NET. +. 99999999 IN NS H.ROOT-SERVERS.NET. +. 99999999 IN NS I.ROOT-SERVERS.NET. +. 99999999 IN NS J.ROOT-SERVERS.NET. +. 99999999 IN NS K.ROOT-SERVERS.NET. +. 99999999 IN NS L.ROOT-SERVERS.NET. +. 99999999 IN NS M.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 99999999 IN A 198.41.0.4 +B.ROOT-SERVERS.NET. 99999999 IN A 192.228.79.201 +C.ROOT-SERVERS.NET. 99999999 IN A 192.33.4.12 +D.ROOT-SERVERS.NET. 99999999 IN A 128.8.10.90 +E.ROOT-SERVERS.NET. 99999999 IN A 192.203.230.10 +F.ROOT-SERVERS.NET. 99999999 IN A 192.5.5.241 +G.ROOT-SERVERS.NET. 99999999 IN A 192.112.36.4 +H.ROOT-SERVERS.NET. 99999999 IN A 128.63.2.53 +I.ROOT-SERVERS.NET. 99999999 IN A 192.36.148.17 +J.ROOT-SERVERS.NET. 99999999 IN A 192.58.128.30 +K.ROOT-SERVERS.NET. 99999999 IN A 193.0.14.129 +L.ROOT-SERVERS.NET. 99999999 IN A 198.32.64.12 +M.ROOT-SERVERS.NET. 99999999 IN A 202.12.27.33 + + + +#!/bin/sh + +ROOTFILE=./db.root + +echo '@l_prefix@' | egrep '^@l_' | egrep 'prefix@$' >/dev/null +if [ $? -eq 0 ]; then + DIG='dig' +else + DIG='@l_prefix@/bin/dig' +fi + +date=`date '+%Y-%m-%d'` +cat >$ROOTFILE <$ROOTFILE.raw && break +done +[ -f $ROOTFILE.raw ] || exit 1 +awk <$ROOTFILE.raw ' + /IN[ ]NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); } + /IN[ ]A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); } +' |\ +egrep -v '^;' |\ +sort >>$ROOTFILE +echo "" >>$ROOTFILE +rm $ROOTFILE.raw + + + +;; +;; db.localhost -- zonefile for the forward mapping of the loopback network +;; + +$TTL 86400 + +@ IN SOA localhost. root.localhost. ( + 2001010101 ; SERIAL + 6H ; REFRESH: Secondaries refresh + 60M ; RETRY: Secondaries retry + 1W ; EXPIRE: Maximum TTL of data (expiry) + 1D ; MINTTL: Minimum TTL of data (expiry) + ) + + IN NS @ + IN A 127.0.0.1 + + + +;; +;; db.localhost.ipv4 -- zonefile for the IPv4 reverse mapping of the loopback network +;; + +$TTL 86400 + +@ IN SOA localhost. root.localhost. ( + 2001010101 ; SERIAL + 6H ; REFRESH: Secondaries refresh + 60M ; RETRY: Secondaries retry + 1W ; EXPIRE: Maximum TTL of data (expiry) + 1D ; MINTTL: Minimum TTL of data (expiry) + ) + + IN NS @ +1 IN PTR localhost. + + + +;; +;; db.localhost.ipv6 -- zonefile for the IPv6 reverse mapping of the loopback network +;; + +$TTL 86400 + +@ IN SOA localhost. root.localhost. ( + 2001010101 ; SERIAL + 6H ; REFRESH: Secondaries refresh + 60M ; RETRY: Secondaries retry + 1W ; EXPIRE: Maximum TTL of data (expiry) + 1D ; MINTTL: Minimum TTL of data (expiry) + ) + + IN NS @ + IN PTR localhost. + + diff --git a/bind/db.localhost b/bind/db.localhost deleted file mode 100644 index aa2efb663e..0000000000 --- a/bind/db.localhost +++ /dev/null @@ -1,17 +0,0 @@ -;; -;; db.localhost -- zonefile for the forward mapping of the loopback network -;; - -$TTL 86400 - -@ IN SOA localhost. root.localhost. ( - 2001010101 ; SERIAL - 6H ; REFRESH: Secondaries refresh - 60M ; RETRY: Secondaries retry - 1W ; EXPIRE: Maximum TTL of data (expiry) - 1D ; MINTTL: Minimum TTL of data (expiry) - ) - - IN NS @ - IN A 127.0.0.1 - diff --git a/bind/db.localhost.ipv4 b/bind/db.localhost.ipv4 deleted file mode 100644 index 8c4abc0f66..0000000000 --- a/bind/db.localhost.ipv4 +++ /dev/null @@ -1,17 +0,0 @@ -;; -;; db.localhost.ipv4 -- zonefile for the IPv4 reverse mapping of the loopback network -;; - -$TTL 86400 - -@ IN SOA localhost. root.localhost. ( - 2001010101 ; SERIAL - 6H ; REFRESH: Secondaries refresh - 60M ; RETRY: Secondaries retry - 1W ; EXPIRE: Maximum TTL of data (expiry) - 1D ; MINTTL: Minimum TTL of data (expiry) - ) - - IN NS @ -1 IN PTR localhost. - diff --git a/bind/db.localhost.ipv6 b/bind/db.localhost.ipv6 deleted file mode 100644 index b2e8a66555..0000000000 --- a/bind/db.localhost.ipv6 +++ /dev/null @@ -1,17 +0,0 @@ -;; -;; db.localhost.ipv6 -- zonefile for the IPv6 reverse mapping of the loopback network -;; - -$TTL 86400 - -@ IN SOA localhost. root.localhost. ( - 2001010101 ; SERIAL - 6H ; REFRESH: Secondaries refresh - 60M ; RETRY: Secondaries retry - 1W ; EXPIRE: Maximum TTL of data (expiry) - 1D ; MINTTL: Minimum TTL of data (expiry) - ) - - IN NS @ - IN PTR localhost. - diff --git a/bind/db.root b/bind/db.root deleted file mode 100644 index 80e1fc2251..0000000000 --- a/bind/db.root +++ /dev/null @@ -1,32 +0,0 @@ -;; -;; db.root -- Internet Root Nameservers -;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON 2007-10-05 BY db.root.sh! -;; - -. 99999999 IN NS A.ROOT-SERVERS.NET. -. 99999999 IN NS B.ROOT-SERVERS.NET. -. 99999999 IN NS C.ROOT-SERVERS.NET. -. 99999999 IN NS D.ROOT-SERVERS.NET. -. 99999999 IN NS E.ROOT-SERVERS.NET. -. 99999999 IN NS F.ROOT-SERVERS.NET. -. 99999999 IN NS G.ROOT-SERVERS.NET. -. 99999999 IN NS H.ROOT-SERVERS.NET. -. 99999999 IN NS I.ROOT-SERVERS.NET. -. 99999999 IN NS J.ROOT-SERVERS.NET. -. 99999999 IN NS K.ROOT-SERVERS.NET. -. 99999999 IN NS L.ROOT-SERVERS.NET. -. 99999999 IN NS M.ROOT-SERVERS.NET. -A.ROOT-SERVERS.NET. 99999999 IN A 198.41.0.4 -B.ROOT-SERVERS.NET. 99999999 IN A 192.228.79.201 -C.ROOT-SERVERS.NET. 99999999 IN A 192.33.4.12 -D.ROOT-SERVERS.NET. 99999999 IN A 128.8.10.90 -E.ROOT-SERVERS.NET. 99999999 IN A 192.203.230.10 -F.ROOT-SERVERS.NET. 99999999 IN A 192.5.5.241 -G.ROOT-SERVERS.NET. 99999999 IN A 192.112.36.4 -H.ROOT-SERVERS.NET. 99999999 IN A 128.63.2.53 -I.ROOT-SERVERS.NET. 99999999 IN A 192.36.148.17 -J.ROOT-SERVERS.NET. 99999999 IN A 192.58.128.30 -K.ROOT-SERVERS.NET. 99999999 IN A 193.0.14.129 -L.ROOT-SERVERS.NET. 99999999 IN A 198.32.64.12 -M.ROOT-SERVERS.NET. 99999999 IN A 202.12.27.33 - diff --git a/bind/db.root.sh b/bind/db.root.sh deleted file mode 100644 index e95fcba7bd..0000000000 --- a/bind/db.root.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -ROOTFILE=./db.root - -echo '@l_prefix@' | egrep '^@l_' | egrep 'prefix@$' >/dev/null -if [ $? -eq 0 ]; then - DIG='dig' -else - DIG='@l_prefix@/bin/dig' -fi - -date=`date '+%Y-%m-%d'` -cat >$ROOTFILE <$ROOTFILE.raw && break -done -[ -f $ROOTFILE.raw ] || exit 1 -awk <$ROOTFILE.raw ' - /IN[ ]NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); } - /IN[ ]A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); } -' |\ -egrep -v '^;' |\ -sort >>$ROOTFILE -echo "" >>$ROOTFILE -rm $ROOTFILE.raw - diff --git a/bind/named.conf b/bind/named.conf deleted file mode 100644 index e65b4a6a7c..0000000000 --- a/bind/named.conf +++ /dev/null @@ -1,84 +0,0 @@ -## -## @l_prefix@/etc/bind/named.conf -- BIND configuration -## - -controls { - inet 127.0.0.1 port 953 - allow { 127.0.0.1; } - keys { "rndc-key"; }; -}; - -include "@l_prefix@/etc/bind/rndc.key"; - -logging { - channel logfile { - file "@l_prefix@/var/bind/named.log"; - severity info; - print-category yes; - print-severity no; - print-time yes; - }; - category "default" { "logfile"; }; - category "general" { "logfile"; }; - category "security" { "logfile"; }; - category "config" { "logfile"; }; - category "queries" { "logfile"; }; - category "update" { "logfile"; }; - category "notify" { "logfile"; }; - category "database" { "logfile"; }; - category "dnssec" { "logfile"; }; - category "resolver" { "logfile"; }; - category "xfer-in" { "logfile"; }; - category "xfer-out" { "logfile"; }; - category "dispatch" { "logfile"; }; - category "lame-servers" { "logfile"; }; - category "delegation-only" { "logfile"; }; -}; - -options { - pid-file "@l_prefix@/var/bind/named.pid"; - directory "@l_prefix@/etc/bind/named.db"; - statistics-file "@l_prefix@/var/bind/named.stats"; - allow-query { any; }; - allow-transfer { any; }; - transfers-in 10; - transfers-per-ns 2; - max-transfer-time-in 120; - transfer-format one-answer; - cleaning-interval 60; - interface-interval 60; - listen-on port 53 { 127.0.0.1; }; - #query-source address 127.0.0.1 port *; - #transfer-source 127.0.0.1; - #notify-source 127.0.0.1; -}; - -zone "." IN { - type hint; - file "db.root"; -}; - -zone "localhost" IN { - type master; - file "db.localhost"; - notify no; - allow-update { none; }; - allow-transfer { any; }; -}; - -zone "0.0.127.in-addr.arpa" IN { - type master; - file "db.localhost.ipv4"; - notify no; - allow-update { none; }; - allow-transfer { any; }; -}; - -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" { - type master; - file "db.localhost.ipv6"; - notify no; - allow-update { none; }; - allow-transfer { any; }; -}; - diff --git a/bind/rndc.conf b/bind/rndc.conf deleted file mode 100644 index 96bce00452..0000000000 --- a/bind/rndc.conf +++ /dev/null @@ -1,16 +0,0 @@ -## -## @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration -## - -options { - default-server 127.0.0.1; - default-port 953; - default-key "rndc-key"; -}; - -server localhost { - key "rndc-key"; -}; - -include "@l_prefix@/etc/bind/rndc.key"; -