Install DJBDNS On FreeBSD

tinydns is a powerful and secure DNS server on FreeBSD.

1) Install djbdns

# cd /usr/ports/dns/djbdns

# make install clean

2) Create new user.

# pw group add dns -g 1002

# pw user add dnscache -d /dev/null -s /dev/null -c “dnscache” -g 1002 -u 1003

# pw user add tinydns -d /dev/null -s /dev/null -c “dnscache” -g 1002 -u 1004

# pw user add dnslog -d /dev/null -s /dev/null -c “dnscache” -g 1002 -u 1005

3) Create dnscache folder.

# mkdir /var/dns

# dnscache-conf dnscache dnslog /var/dns/dnscache 10.0.0.100

# tinydns-conf tinydns dnslog /var/dns/tinydns-inner 10.0.0.101

# tinydns-conf tinydns dnslog /var/dns/tinydns-outer 172.16.0.101

# mkdir /service

# ln -s /var/dns/dnscache /service/dnscache

# ln -s /var/dns/tinydns-inner /service/tinydns-inner

# ln -s /var/dns/tinydns-outer /service/tinydns-outer

 

4) Enable DJBDNS.

# vi /etc/rc.conf

svscan_enable=”YES”

svscan_servicedir=”/service”

 

5) Start DNS server.

# /usr/local/etc/rc.d/svscan start

# svc -t /service/*

 

Be the first to comment

Leave a Reply