FreeBSD Install DJBDNS Server

To install the DJBdns server on FreeBSD, you can follow these steps:

  1. Update the FreeBSD package repository by running the following command:
sudo pkg update
  1. Install the daemontools package, which provides the svscan command required to start the DJBdns service:
sudo pkg install daemontools
  1. Download the latest version of DJBdns from the official website using the following command:
fetch https://cr.yp.to/djbdns/djbdns-1.05.tar.gz
  1. Extract the archive by running the following command:
tar -zxvf djbdns-1.05.tar.gz
  1. Change to the extracted directory:
cd djbdns-1.05
  1. Compile and install the DJBdns server using the following commands:
make
make setup check

The make setup check command will create the required directories and check the installation for any issues.

  1. Once the installation is complete, you can start the DJBdns service using the svscan command:
sudo svscanboot

This will start the svscan process, which will monitor the /service directory for service definitions.

  1. Create a directory for your DJBdns service definition:
sudo mkdir /service/djbdns
  1. Create a file named run in the /service/djbdns directory:
sudo nano /service/djbdns/run
  1. Add the following lines to the run file:
#!/bin/sh
exec envuidgid dnslog /usr/local/bin/tinydns
  1. Save the changes to the run file and make it executable:
sudo chmod +x /service/djbdns/run
  1. Finally, restart the svscan process to load the new service definition:
sudo svc -t /service/*

This will restart the svscan process and load the new service definition.

Your DJBdns server should now be running and ready to respond to DNS queries. Note that you will need to configure your DNS zone files and run the tinydns-edit command to generate the DNS data files for your domains. You can find more information on the DJBdns website or in the DJBdns documentation.

Leave a Comment