Lingkage program

Install and configure djbdns (slackware)

Posted on: December 10, 2006

Title : Install and configure djbdns
Os : Linux
Distro : Slackware
URL : –
i. Install Daemontools
# mkdir -p /var/package
# chmod 1755 /var/package
# cd /var/package
# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
# gunzip daemontools-0.76.tar
# tar -xpf daemontools-0.76.tar
# rm daemontools-0.76.tar
# cd admin
# wget

http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
# cd daemontools-0.76
# patch -p1 &1 | \

# vi /etc/inittab

— Notes : Comment out SVSCAN part

# init q
# vi /etc/inittab

— Notes : Uncomment out SVSCAN part

# ps -aux

— Check and see SVS is running on /var/services

iv. Edit /etc/resolv.conf

— Add in —
domain xwings.net
nameserver 10.0.0.1
—-

v. Preparing for djbdns

# mkdir /var/dns
# groupadd dns
# useradd dnscache -g dns -d /var/dns -s /bin/false
# useradd dnslog -g dns -d /var/dns -s /bin/false
# useradd dns -g dns -d /var/dns -s /bin/false

vi. Install djbdns

# cd /tmp
# wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
# tar xvzf djbdns-1.05.tar.gz
# http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/djbdns-1.05.errno.patch
# cd djbdns-1.05
# patch -p1 /var/dns/dnscache/root/servers/xwings.net
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/1.0.0.127.in-addr.arpa
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/0.0.10.in-addr.arpa
# wget ftp://ftp.internic.net/domain/named.cache
# awk ‘$1 ~ /.ROOT-SERVERS.NET/ {print $4}’ named.cache > /var/dns/dnscache/root/servers/@

Testing :

# dnsqr a kjlau.xwings.net
1 kjlau.xwings.net:
50 bytes, 1+1+0+0 records, response, noerror
query: 1 kjlau.xwings.net
answer: kjlau.xwings.net 85740 A 10.0.0.144

Maintain SVC

Restart Service
# svc -t /var/dns/dnscache
Stop
# svc -d /var/dns/dnscache

The rc.dns file

#!/bin/sh

# M.J. Prinsen
#
# description: the djbdns DNS

PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

case “$1” in
start)
echo “Starting dns”
if svok /service/dnscache ; then
svc -u /service/dnscache
else
echo dnscache service not running
fi
if svok /service/tinydns ; then
svc -u /service/tinydns
else
echo tinydns service not running
fi
if svok /service/axfrdns ; then
svc -u /service/axfrdns
else
echo axfrdns service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/dns
fi
;;
stop)
echo “Stopping dns …”
echo ” dnscache”
svc -d /service/dnscache
echo ” tinydns”
svc -d /service/tinydns
echo ” axfrdns”
svc -d /service/axfrdns
if [ -f /var/lock/subsys/dns ]; then
rm /var/lock/subsys/dns
fi
;;
stat)
svstat /service/dnscache
svstat /service/dnscache/log
echo “–”
svstat /service/tinydns
svstat /service/tinydns/log
echo “–”
svstat /service/axfrdns
svstat /service/axfrdns/log
;;
reload|hup)
echo “Sending HUP signal to dns.”
svc -h /service/dnscache
svc -h /service/tinydns
svc -h /service/axfrdns
;;
pause)
echo “Pausing dnscache”
svc -p /service/dnscache
echo “Pausing tinydns”
svc -p /service/tinydns
echo “Pausing axfrdns”
svc -p /service/axfrdns
;;
cont)
echo “Continuing dnscache”
svc -c /service/dnscache
echo “Continuing tinydns”
svc -c /service/tinydns
echo “Continuing axfrdns”
svc -c /service/axfrdns
;;
restart)
echo “Restarting dns:”
echo “* Stopping dnscache.”
svc -d /service/dnscache
echo “* Stopping tinydns.”
svc -d /service/tinydns
echo “* Stopping axfrdns.”
svc -d /service/axfrdns
echo “* Restarting dnscache.”
svc -u /service/dnscache
echo “* Restarting tinydns.”
svc -u /service/tinydns
echo “* Restarting axfrdns.”
svc -u /service/axfrdns
;;
help)
cat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • Order Xtrasize: Hi there, all is going well here and ofcourse every one is sharing facts, that's in fact fine, keep up writing.
  • chatroulette: I am curious to find out what blog system you're using? I'm experiencing some small security issues with my latest site and I would like to find s
  • 3:00 AM: Hello! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any suggest

Categories

%d bloggers like this: