+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
AUX 1.05-errno.patch 238 RMD160 b479d8c16dd8fe7206cba19125dd8866c2584301 SHA1 f23206f3ffc1a8aa6768fdb2ef588012c17eaa79 SHA256 40e01efac08e95bf87b46e2d86378b0a60c234c64080b7f42039178ac6de61af
AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6.patch 10049 RMD160 9154f495cfc5eebcb6617b8fa65ee0bea0cbbf80 SHA1 0461b199c048c6b94b659280d04a4f537cdb9c04 SHA256 56c7db6c5bed3200e1f6e4995018c96158085f2f7169c7b148c7c034ddff8111
AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch 9914 RMD160 c416dd6575819cfd40ef0d306ccb14d34a5afc90 SHA1 8dd3ce7758d3a97cafbe6a60ea83f48e916f496d SHA256 b5e030e96ed98d96d36c39e3466e04d98d39c5f1c7e94254ea3da5e99381eed6
AUX CVE2008-4392_0002-dnscache-cache-soa-records.patch 2944 RMD160 0b58e57bc11b36113c5fef73a64c869895f83889 SHA1 ac9b6a62c62588205cc4dc71da4e0ad6630f9635 SHA256 1cd7b848305646d3015d8f2817acdced65894b8ab6e9dacb02077acebc50841b
AUX CVE2009-0858_0001-check-response-domain-name-length.patch 366 RMD160 c9a7ca8ab3e0359cd55caa0fd14ce3878d98c26c SHA1 c64bd006d5ff7ea416d6baeff062b94eebcb8c8d SHA256 8ca8bd81fa6fb17576f11de9e97a582f0c30d7f5c6e797defa41a98d33770e33
AUX djbdns-setup 10881 RMD160 eabdbfd226d6ee4172e55a62beed77bb68aa222c SHA1 f056a51a5f511c54b98536c238eff8c1fecb5755 SHA256 33c64d8341ea868e124e7fe0da6a8f9ba6fc799a79584e002a82c572921ed5e4
+AUX djbdns-setup-r17 10881 RMD160 eabdbfd226d6ee4172e55a62beed77bb68aa222c SHA1 f056a51a5f511c54b98536c238eff8c1fecb5755 SHA256 33c64d8341ea868e124e7fe0da6a8f9ba6fc799a79584e002a82c572921ed5e4
AUX dnscache-setup 6013 RMD160 80d6f486f36245efdd87e768e754a2842836a7b8 SHA1 1bc0bd6e2c650b00101544ba1686ef8d76aacffe SHA256 dcf78d102db9b6407a7886f01b830a5509724ce4540068444ef4f0e5cf9ea6e2
AUX dnsroots.patch 349 RMD160 c3be22070645e27a8c16e9f1dd268963b749c5f7 SHA1 f09404a752062956319b4ebb6d381588df467eba SHA256 99e8ef90a20f66fedf903aa13e3f5360010cf11c27c59dc53b967f02ffe06114
AUX dnstracesort.patch 327 RMD160 aaa564aa9cb0dcad4ebb64121c82bf50fda64254 SHA1 cf8b7825d826bfd3f3314c848a8843c2a5a70ae3 SHA256 f1d83e1365f68571fa4e007d5219720f8d65eb3730040a087fceb0ce2d8806bf
AUX tinydns-setup 3212 RMD160 1cda8eaa07ff559342b13b3d90025b83517a4ed4 SHA1 a357391397cd04e462803921357ffc1730c8aab9 SHA256 2d4e144e5408793f1d5ffa23abc510a04e449a6306965c1a35fb8956a419696f
DIST djbdns-1.05-test23.diff.bz2 18480 RMD160 33037f2a41abb49c305f3efec4402c6965c8b8b8 SHA1 34251597d211ff00791cb6546e8ef60d75ce5477 SHA256 e702f47b4a4c77fe5cec474a8219a072cfaaee07282650b7e0dd322ed82e8f33
DIST djbdns-1.05.tar.gz 85648 RMD160 a832cbfd93e4ccec6a565492a4ee0b3c1b4b68ed SHA1 2efdb3a039d0c548f40936aa9cb30829e0ce8c3d SHA256 3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48
-EBUILD djbdns-1.05-r23.ebuild 3687 RMD160 3414104bffb0ecafa5a635d7156ad3c66e46cf94 SHA1 a5a1c6eba70e1d550677e28ab6bff19dabf34548 SHA256 7f5a20b42e6dd454f50c991e9bc85c9854aab4b2f5e2658814c45eb8068c3c1f
-EBUILD djbdns-1.05-r24.ebuild 3881 RMD160 5b73d868daccd4bb7fb402379c4933bc156e5641 SHA1 d2fb4324dda3f4837761078981b8a36025a92631 SHA256 d1a75c48c12e2248a6f6551ee5959fa94740367dce576cf70a8067f55da40e95
-EBUILD djbdns-1.05-r25.ebuild 3954 RMD160 b3372e16d8463d8a02c26e3956ca351fde7a09e2 SHA1 fbfd992bf8ffff5195e27d9e5bf7098d578d78b0 SHA256 7823fd811dfe2857bfe446f2f2f8a3f475b90c15d4f3ad7f6e22a22f55f0b113
-MISC ChangeLog 19981 RMD160 ef6f16a950a902d407594287f2affa4825512902 SHA1 dd9dbbae90cdb40ed51aab9080248a7c0c56d7e0 SHA256 31a600b30a3981802c840c94edc6ece23baa98e12832006f07786f2fd82c14cf
+EBUILD djbdns-1.05-r23.ebuild 3688 RMD160 ca17b8df6da21a9b43568225d23833a4e42a45bf SHA1 014bffb4e1f18b8aa9301ae57572864fe37f19aa SHA256 89144b7f749856a5cff64e13f8c856f8382e2d473733d10874f6669fdb24600a
+EBUILD djbdns-1.05-r24.ebuild 3883 RMD160 42d53dc90c59cecb6378c7442b3f95a454463945 SHA1 9bd23aae6ea006965b283dfb5246468866cce405 SHA256 56329adc9b92658def3101bae259c8f847f7e6a3a4391938aa5ad53f6648d87f
+EBUILD djbdns-1.05-r25.ebuild 3954 RMD160 98bfbe59bed1b86a8a97b7e0d14ffa4fe9e35b60 SHA1 53529314890684bbb53039b9f646e809b704228a SHA256 2cd02d012f9fa37b3cc176ca2242021c0232246736a61e30154821cacd7cd13d
+MISC ChangeLog 20420 RMD160 b7e4b6a054109d29d16cd577c2f61ea20e28f5dc SHA1 a53379b9e0eee7b83a30b83a37d7115f24494f78 SHA256 184fbb106f385884f9c5ce0252130b2e55ce818768b191156d65711530fd4883
MISC metadata.xml 409 RMD160 7b69b690876c3e5f44ca61381a7d757b64907978 SHA1 bb4b744ec4c5ae17e26ae313b206a1bfdb2be3db SHA256 50dabe586f27b034bb8b11d38ea34ed030dcaa73221d1498859fabb914f651f0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iQIcBAEBCgAGBQJPeEKUAAoJEPqDWhW0r/LC1csQAJJMoECS/wIIl3z7P7yyd7G3
+5GldTegYO/owiGRR2XJsDDUU+AJTz3/uOU/qT6wWgwvw9sgmik34F+TRwBtPpnOw
+ckj6mk8cDvdM2pbam31PDN4psC6uzLIsGlXe2Hwdl9v7bM/SbNFQDVaD0ZP5xQdz
+M27XGlXAXno2WTV4ybla0HMSAmkffyeWEIVjry27EVs2Am25v6YQ7yrl67+uQ5aj
+ljcPigMn96Nv7JBO0prleX8gGeUmxVMGsLQQYB5GD3T+2n3zStt0cAIuaVrJhSUb
+Cig+3op9m//VCj+TzOkdqFZQ6+kLoSM3uEh5wxGp/PhH15uPRS1gthKb5o4yU98n
+yjti7SzaQJjd8Vm6vfY1qhJ832uzN6O6Y0+5bhcLRQiikFrkgs9sViSAV6ydCC4N
+2ZIrHVdmUvJ7G8cQAOPGXj5ZfoAPZgMUL279cPy1VXpwfu0HGh8000E0/l4yyHp7
+mssSZP3yE27SCc7s0he39AsBa3PYOzNh/nhRDAxSAusRynTG84vadMpKU+4sHn9a
+ewYVeEmeKpmQaojkf/FRkpx1TV1syrZMUY7dYvncPkDyNzPyAlQ+7tjPrXYRwyHy
+BXFQGi1a4BGg7g1r2hZWCUOS/rzF8xD/7tOCGqsIinbtVO4Sved3Ca8NZXyJKHlX
+jKrlno6Vlr3vK8kWaASo
+=nji+
+-----END PGP SIGNATURE-----
--- /dev/null
+#!/bin/bash
+#
+# djbdns-setup
+#
+# Copyright (C) 2004-2006 Kalin KOZHUHAROV <kalin@thinrope.net>
+# The latest version of this script can be accessed at:
+# rsync://rsync.tar.bz/gentoo-portage-pkalin/net-dns/djbdns/files/djbdns-setup
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# http://www.gnu.org/copyleft/gpl.html
+#
+
+# {{{ Rip off the ewarn code from /sbin/functions.sh
+WARN=$'\e[33;01m'
+NORMAL=$'\e[0m'
+ewarn() {
+ echo -e " ${WARN}*${NORMAL} $*"
+ return 0
+}
+# }}}
+
+# {{{ global vars
+S_SEPARATOR="--------------------------------------------------------------------------------"
+D_SEPARATOR="================================================================================"
+
+REQ_GROUP="nofiles"
+REQ_USERS="tinydns dnscache dnslog"
+
+IPs[0]=""
+IPs[1]=""
+IPs[2]=""
+dnscache=0
+tinydns=1
+axfrdns=2
+
+# global vars }}}
+
+# {{{ functions
+check_group_users()
+{
+ echo ": Checking for required group (${REQ_GROUP}) :"
+ grep ${REQ_GROUP} /etc/group &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Adding group ${REQ_GROUP}"
+ /usr/sbin/groupadd ${REQ_GROUP} &>/dev/null && eend 0 || eend 1
+ fi
+
+ echo ": Checking for required users (${REQ_USERS}) :"
+ for user in ${REQ_USERS};
+ do
+ grep ${user} /etc/passwd &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Adding user ${user}"
+ /usr/sbin/useradd -d /dev/null -s /bin/false -g ${REQ_GROUP} ${user} &>/dev/null && eend 0 || eend 1
+ fi
+ done
+ return 0
+}
+
+start_services()
+{
+ local services="$1"
+
+ echo "${SEPARATOR}"
+ echo ": Start services :"
+ echo
+ echo " Your services (${services// /, }) are ready for startup!"
+ echo
+ ewarn " The following requires daemontools to be running!"
+ local answer=""
+ read -p " Would you like ${services// /, } to be started and supervised by daemontools now? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+
+ ebegin "Checking if daemontools are running"
+ ps -A |grep svscanboot &>/dev/null && eend 0 || eend 1
+
+ ebegin "Linking services in /service"
+ # Don't make symbolic links to / !
+ # use ../ instead as it gives trouble in chrooted environments
+ local fixedroot_path=`echo ${mypath} | sed -e 's#^/#../#'`
+ for service in ${services};
+ do
+ for ip in ${IPs[${service}]};
+ do
+ ln -sf ${fixedroot_path}/${service}/${ip} /service/${service}_${ip}
+ done
+ done
+
+ eend 0
+
+ echo
+ ls -l --color=auto /service/
+ echo
+ ebegin "Waiting 5 seconds for services to start"
+ sleep 5 && eend 0
+
+ echo "${SEPARATOR}"
+ echo ": Check services status :"
+ echo
+ for service in ${services};
+ do
+ for ip in ${IPs[${service}]};
+ do
+ svstat /service/${service}_${ip} /service/${service}_${ip}/log
+ done
+ done
+ fi
+ return 0
+}
+
+tinydns_setup()
+{
+ return 0
+}
+
+axfrdns_setup()
+{
+ echo "${S_SEPARATOR}"
+ echo ": Grant access to axfrdns :"
+ echo
+ TCPRULES_DIR="${mypath}/axfrdns/${myip}/control"
+ echo " axfrdns is accessed by your secondary servers and when response cannot fit UDP packet"
+ echo " You have to specify which IP addresses are allowed to access it"
+ echo " in ${TCPRULES_DIR}/tcp.axfrdns"
+ echo
+ echo " Example:"
+ echo " 1.2.3.4 would allow the host 1.2.3.4"
+ echo " 1.2.3. would allow ALL hosts 1.2.3.x (like 1.2.3.4, 1.2.3.100, etc.)"
+ ewarn "Do NOT forget the trailing dot!"
+ echo
+ echo " Press Enter if you do not want to allow any access now."
+ echo
+
+ sed -i -e "s#-x tcp.cdb#-x control/tcp.axfrdns.cdb#g" ${mypath}/axfrdns/${myip}/run
+ if [ -e ${TCPRULES_DIR}/tcp.axfrdns ]
+ then
+ ewarn "${TCPRULES_DIR}/tcp.axfrdns exists."
+ read -p " Do you want it cleared? [y|N]: " answer
+ if [ "${answer}" == "y" ]
+ then
+ echo '# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"' > ${TCPRULES_DIR}/tcp.axfrdns
+ fi
+ fi
+
+ read -p " IP to allow (press Enter to end)> " ipallow
+
+ while [ "$ipallow" != "" ]
+ do
+ echo "${ipallow}:allow" >> ${TCPRULES_DIR}/tcp.axfrdns
+ read -p " IP to allow (press Enter to end)> " ipallow
+ done
+ echo ":deny" >> ${TCPRULES_DIR}/tcp.axfrdns
+
+ echo " Here are the tcprules created so far:"
+ echo
+ cat ${TCPRULES_DIR}/tcp.axfrdns
+ echo
+ local answer=""
+ read -p " Would you like ${TCPRULES_DIR}/tcp.axfrdns.cdb updated? [Y|n]: " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ ebegin "Updating ${TCPRULES_DIR}/tcp.axfrdns.cdb"
+ bash -c "cd ${TCPRULES_DIR} && make" && eend 0 || eend 1
+ fi
+ return 0
+}
+
+dnscache_setup()
+{
+ echo ": Configure forwarding :"
+ echo
+ echo " dnscache can be configured to forward queries to another"
+ echo " DNS cache (such as the one your ISP provides) rather than"
+ echo " performing the lookups itself."
+ echo
+ echo " To enable this forwarding-only mode (usually a good idea),"
+ echo " provide the IPs of the caches to forward to."
+ echo " To have dnscache perform the lookups itself, just press Enter."
+ echo
+ read -p " forward-to IP> " myforward
+ echo
+ if [ "$myforward" != "" ]
+ then
+ echo $myforward > ${mypath}/dnscache/${myip}/root/servers/\@
+ echo -n "1" > ${mypath}/dnscache/${myip}/env/FORWARDONLY
+
+ read -p " forward-to IP (press Enter to end)> " myforward
+ while [ "$myforward" != "" ]
+ do
+ echo $myforward >> ${mypath}/dnscache/${myip}/root/servers/\@
+ read -p " forward-to IP (press Enter to end)> " myforward
+ done
+
+ echo
+ echo " Currently all queries will be forwarded to:"
+ echo
+ cat ${mypath}/dnscache/${myip}/root/servers/\@
+ echo
+ fi
+
+ echo "${SEPARATOR}"
+ echo ": Configuring clients :"
+ echo
+ echo " By default dnscache allows only localhost (127.0.0.1) to"
+ echo " access it. You have to specify the IP addresses of the"
+ echo " clients that shall be allowed to use it."
+ echo
+ echo " Example:"
+ echo " 1.2.3.4 would allow only one host: 1.2.3.4"
+ echo " 1.2.3 would allow all hosts 1.2.3.0/24 (e.g. 1.2.3.4, 1.2.3.100, etc.)"
+ echo
+ echo " Press Enter if you do NOT want to allow external clients!"
+ echo
+
+ read -p " Allowed IP> " myclientip
+
+ while [ "$myclientip" != "" ]
+ do
+ touch ${mypath}/dnscache/${myip}/root/ip/${myclientip}
+ read -p " Allowed IP (press Enter to end)> " myclientip
+ done
+
+ echo
+ echo " All queries from the hosts below will be answered:"
+ echo
+ ls -1 ${mypath}/dnscache/${myip}/root/ip
+ echo
+
+ #TODO
+ #configure cachsize - $mypath/env/CACHESIZE
+
+ #TODO
+ #configure datalimit - $mypath/env/DATALIMIT
+ return 0
+}
+
+common_setup()
+{
+ local service_human="$1"
+ local service_machine="$2"
+ local services="$3"
+
+ echo ": ${service_human} setup :"
+ echo
+
+ for service in ${services};
+ do
+ if [ ! -e ${mypath}/${service} ]
+ then
+ ebegin "Creating ${mypath}/${service}"
+ mkdir -p $mypath/${service} && eend 0 || eend 1
+ fi
+ done
+
+ echo "${SEPARATOR}"
+ echo ": IP address to bind to :"
+ echo
+ echo " Specify an address to which the ${service_human} should bind."
+ echo " Currently accessible IPs:"
+ local addrs=`ifconfig -a | grep "inet addr" | cut -f2 -d":" | cut -f1 -d" "`
+ echo " "$addrs
+ echo
+
+ while [ "${myip}" == "" ]
+ do
+ read -p " IP to bind to> " myip
+ done
+ echo
+
+ for service in ${services};
+ do
+ IPs[${service}]="${IPs[${service}]} ${myip}"
+ done
+
+ local dnscache_INSTALL="/usr/bin/dnscache-conf dnscache dnslog ${mypath}/dnscache/${myip} $myip"
+ local tinydns_INSTALL="/usr/bin/tinydns-conf tinydns dnslog ${mypath}/tinydns/${myip} $myip"
+ local axfrdns_INSTALL="\
+ /usr/bin/axfrdns-conf tinydns dnslog ${mypath}/axfrdns/${myip} ${mypath}/tinydns/${myip} $myip &&\
+ mkdir -p ${mypath}/axfrdns/${myip}/control &&\
+ echo -e \"tcp.axfrdns.cdb:\ttcp.axfrdns\n\ttcprules tcp.axfrdns.cdb .tcp.axfrdns.cdb.tmp < tcp.axfrdns\" > ${mypath}/axfrdns/${myip}/control/Makefile &&\
+ rm -f ${mypath}/axfrdns/${myip}/tcp ${mypath}/axfrdns/${myip}/Makefile"
+
+ for service in ${services};
+ do
+ if [ ! -e ${mypath}/${service}/${myip} ]
+ then
+ ebegin "Setting up ${service} in ${mypath}/${service}/${myip}"
+ eval command=\$${service}_INSTALL
+ /bin/bash -c "${command}" && eend 0 || eend 1
+ else
+ ewarn "${service} directory ${mypath}/${service}/${myip} exists, nothing done."
+ fi
+ done
+
+}
+
+# functions }}}
+
+# {{{ main script
+
+if [ `id -u` -ne 0 ]
+then
+ ewarn "You must be root to run this script, sorry."
+ exit 1
+else
+
+ echo "${D_SEPARATOR}"
+ echo ": DJB DNS setup :"
+ echo
+ echo " This script will help you setup the following:"
+ echo
+ echo " DNS server(s): to publish addresses of Internet hosts"
+ echo
+ echo " DNS cache(s) : to find addresses of Internet hosts"
+ echo
+ echo " For further information see:"
+ echo " http://cr.yp.to/djbdns/blurb/overview.html"
+ echo
+ ewarn "If you have already setup your services,"
+ ewarn "either exit now, or setup in different directories."
+ echo
+
+ answer=""
+ read -p " Would you like to continue with setup? [Y|n]> " answer
+ if [ "${answer}" == "n" ] || [ "${answer}" == "N" ]
+ then
+ ewarn "Aborting setup"
+ exit 1
+ fi
+
+ echo "${D_SEPARATOR}"
+ echo ": Choose install location :"
+ echo
+ default_path="/var"
+ echo " The default (${default_path}) will install them"
+ echo " in ${default_path}/\${service}/\${IP_ADDRESS}"
+ echo
+ echo " For example:"
+ echo " /var/tinydns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /axfrdns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /dnscache/127.0.0.1"
+ echo
+ ewarn "Do NOT enter trailing slash"
+ echo " Where do you want services installed?"
+ read -p "[${default_path}] > " mypath
+ echo
+
+ if [ "${mypath}" == "" ]
+ then
+ mypath=${default_path}
+ fi
+
+ echo "${D_SEPARATOR}"
+ check_group_users
+
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
+ echo "${D_SEPARATOR}"
+ answer=""
+ read -p " Would you like to setup ${another}dnscache? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS cache" "dnscache" "dnscache"
+ if [ $? == 0 ]
+ then
+ dnscache_setup
+ else
+ ewarn "Skipping dnscache specific setup."
+ fi
+ fi
+ another="another "
+ done
+
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
+ echo "${D_SEPARATOR}"
+ answer=""
+ read -p " Would you like to setup ${another}DNS server? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS server" "{tinydns,afxrdns}" "tinydns axfrdns"
+ if [ $? == 0 ]
+ then
+ tinydns_setup
+ axfrdns_setup
+ else
+ ewarn "Skipping tinydns and axfrdns specific setup."
+ fi
+ fi
+ another="another "
+ done
+
+ echo "${D_SEPARATOR}"
+
+ start_services "tinydns axfrdns dnscache"
+
+ echo "${D_SEPARATOR}"
+fi
+# main script }}}
+# vim: set ts=4 fenc=utf-8 foldmethod=marker: