1. first of all install all djbdns package
apt-get install djbdns
2. then create corresponding user accounts
useradd -r Gtinydns # for dns server
useradd -r Gdnscache # for caching
useradd -r Gdnslog # for logging
useradd -r Gaxfrdns # for zone transfer
3. make configurations
tinydns-conf Gtinydns Gdnslog /etc/tinydns 127.0.0.1
dnscache-conf Gdnscache Gdnslog /etc/dnscache 9.20.3.27
9.20.3.27 is my ip address. you can change with your own.
4. create /etc/event.d/svscan and fill with
# svscan - daemontools
# https://bugs.launchpad.net/ubuntu/+source/daemontools-installer/+bug/66615
#
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /usr/bin/svscanboot
5. touch /etc/dnscache/root/ip/9.20.3.27
6. start the service
mkdir /etc/service
ln -s /etc/tinydns /etc/service
ln -s /etc/dnscache /etc/service
ln -s /etc/axfrdns /etc/service
7. add zones
cd /etc/tinydns/root
.example.com:146.82.204.17:a:259200=example.com:146.82.204.17:86400
=www.example.com:146.82.204.17:86400
+www.example.com:146.82.204.17:86400
+\052.example.com:146.82.204.17:86400
.59.99.73.in-addr.arpa:146.82.204.17:a:259200
No comments:
Post a Comment