X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-fx0-f228.google.com (mail-fx0-f228.google.com [209.85.220.228]) by lists.alpinelinux.org (Postfix) with ESMTP id E5044360F716 for ; Sat, 14 Nov 2009 08:24:28 +0000 (UTC) Received: by fxm28 with SMTP id 28so4408732fxm.25 for ; Sat, 14 Nov 2009 00:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=Tg6obhcKDydFu/vzWS5nDxRi/JGE6kbnKgiFNCy5xcc=; b=LuMklzKyf9u4VrZ+Db8XLKSeC0SsNsS+X3Jhdeqv0gfxnOnG7sVuWwcA0lH9cdjHz6 z8IlncNpOQtYD4OyBaMhnzvCxWo3zCuD+0QY+Qa10fuQ5CBbuOK/iCrvn2tfyu0o0/Bw oAUVUfWDEDHt9b9XYFyAO0NDdBHuxUvVaFPhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=cnY7lBOHlNB8k7mqDNuoNAk4k2ANrDZa3WthfbWx6QQKCffklO0Sh/XghGyvghb6Tb Zkf0j1ntRGbWLxFJfWovN/ZljRYoUATJl6SRPj9IOpi5xjLOsuciwXYZ9Gln7Yf2ofOC vM8tVCdLJeiVsidDWmLXqQz0NEjhHN9vKthXk= Received: by 10.103.67.32 with SMTP id u32mr2182836muk.133.1258187067394; Sat, 14 Nov 2009 00:24:27 -0800 (PST) Received: from ?10.26.97.171? (letku109.adsl.netsonic.fi [194.29.195.109]) by mx.google.com with ESMTPS id j10sm6275506muh.58.2009.11.14.00.24.25 (version=SSLv3 cipher=RC4-MD5); Sat, 14 Nov 2009 00:24:26 -0800 (PST) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Message-ID: <4AFE6935.3090500@iki.fi> Date: Sat, 14 Nov 2009 10:24:21 +0200 From: =?ISO-8859-1?Q?Timo_Ter=E4s?= User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 To: MarkSeymour@GuildAssociates.com CC: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] how do I get axfrdns (djbdns) going in Alpine? References: <9BDC6D38983C45A6A0710925FF6BDE50@markseymour> In-Reply-To: <9BDC6D38983C45A6A0710925FF6BDE50@markseymour> Content-Type: multipart/mixed; boundary="------------040303030708050501080701" This is a multi-part message in MIME format. --------------040303030708050501080701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit MarkSeymour@GuildAssociates.com wrote: > Hello alpine-devel's, and thank you for Alpine Linux! I am a longtime > user of LEAF and its predecessor LRP, so I was excited to find Alpine, > as I've wanted to get away from floppy disk storage of configs for a > long time now. > > I have Shorewall configured to my liking, as well as Tinydns, but now I > want to be able to provide axfr responses to non - djb slave dns > servers, and I would like to log queries. I have not found any > documentation on how to do this with Alpine. Any help would be greatly > appreciated. > > I have added the package djbdns-1.05-r32, which contains axfrdns, but I > don't know where to go from there. Do I follow the Bernstein > instructions at http://cr.yp.to/djbdns/axfrdns-conf.html , including > creating 'acct' and 'logacct'? I assume not, since I don't see a > daemontools package available to give me multilog. I'd be happy to rtfm > if I could find the fm ;) > > Alternatively, I'll consider using BIND since you have it available.... I have axfrdns running on an Alpine 1.8 based box. It uses tcpserver from ucspi-tcp package. I attached the init.d script I'm using. Something like this should be added to djbdns package. - Timo --------------040303030708050501080701 Content-Type: text/plain; name="axfrdns" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="axfrdns" #!/sbin/runscript # control an instance of axfrdns # written for alpine linux - NBA May 2009 # -- Statrup variables UID=$( grep tinydns /etc/passwd | cut -f3 -d: ) GID=$( grep tinydns /etc/group | cut -f3 -d: ) PORT=${PORT:-53} HOST=${HOST:$(hostname)} DAEMON=/usr/bin/axfrdns SUPERSERVER=/usr/bin/tcpserver IFACE="${SVCNAME#*.}" if [ -n "$IFACE" ] && [ "${SVCNAME}" != "tinydns" ]; then ROOT=${ROOT:-/var/cache/tinydns.$IFACE} VARRUN=${VARRUN:-/var/run/axfrdns.$IFACE} else ROOT=${ROOT:-/var/cache/tinydns} VARRUN=${VARRUN:-/var/run/axfrdns} fi #----------------------------------------------------------------- # Main program start() { ebegin "Starting axfrdns" if [ -z "$UID" ] || [ -z "$GID" ]; then eend 1 "tinydns user or group missing" return 1 fi # if its already running, just report it is if [ -e ${VARRUN}.pid ] && [ -d /proc/$( cat ${VARRUN}.pid ) ]; then eend 0 return 0 fi if [ -z "$IP" ]; then eend 1 "IP is not specified in /etc/conf.d/$SVCNAME" return 1 fi ( export UID GID ROOT AXFR echo $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON >/dev/null 2>/dev/null & pid=$! sleep 1 # Check if its still running if ! [ -d /proc/$pid ]; then # rm ${VARRUN}.pid # $SUPERSERVER -HR -l $HOST $IP $PORT $DAEMON >/dev/null 2>/dev/null & return 1 fi echo $pid > ${VARRUN}.pid ) eend $? return 0 } stop() { ebegin "Stopping axfrdns" start-stop-daemon --stop -m --pidfile ${VARRUN}.pid --oknodo \ --exec $SUPERSERVER && rm ${VARRUN}.pid eend $? } --------------040303030708050501080701-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---