TinyDNS

Publish the addresses of your computers with this simple and secure DNS server.

Setup tinydns
Add the users for tinydns to run under:

useradd -M -d /nohome -s /bin/false Gtinydns
useradd -M -d /nohome -s /bin/false Gdnslog

Create an /etc/tinydns service directory with the IP address of the DNS server: The IP address must be configured on this computer. The IP address must not have a DNS cache or any other port-53 service. One computer can run a DNS server alongside a DNS cache as long as they are on separate IP addresses. Instructions here can be used to set up a virtual ethernet interface.

tinydns-conf Gtinydns Gdnslog /etc/tinydns <ip address>

Create the symbolic link in /service to start tinydns:

ln -s /etc/tinydns /service

Adding Addresses to Your DNS Server
Your server will not answer requests about a domain name unless it knows that it is in charge ot that domain:

cd /service/tinydns/root
./add-ns productionmonkeys.net 192.168.0.106
./add-ns 0.168.192.in-addr.arpa 192.168.0.106
make

Add an mx record:

cd /service/tinydns/root
./add-mx productionmonkeys.net 192.168.0.106
make

Add a host address:

cd /service/tinydns/root
./add-host gorilla.productionmonkeys.net 192.168.0.100
make

Add a host alias:

cd /service/tinydns/root
./add-alias chimpanzee.productionmonkeys.net 192.168.0.100
make

Replicating your DNS Server
John Simpson has a different method to DNS replication. He separates his data files into separate files for each zone/domain which might be a better solution if you are managing multiple domains rather than having them in one big data file.

On the "source" DNS server, edit /service/tinydns/root/Makefile to replicate the data to the second server. Add the following line to the beginning of the Makefilemaking sure that the space in front of the rsync line is a TAB!!

remote: data.cdb
             rsync -az -e ssh data.cdb <destination server>:/service/tinydns/root/data.cdb

On the "destination" server, edit /service/tinydns/root/data to both remind you that it is replicated and to prevent make from generating a data.cdb file:

# Do not edit data on this computer! data.cdb is copied from 1.8.7.200.
# The following line protects data.cdb by stopping make.
9

To eliminate the need to enter the remote server's password to rsync the updated file, consider using Public Key Authentication.

Recent Updates

  • 8 months 2 weeks ago
    1.27.2 update
  • 8 months 3 weeks ago
    Drupal 10/11 config
  • 8 months 3 weeks ago
  • PHP
    8 months 3 weeks ago
    PHP 8.3.11 and AlmaLinux
  • 8 months 4 weeks ago
    New version of Pound