DNS for home lab

When building out a home lab one item on the infrastructure services list is Domain Name Service (DNS). I don’t think running DNS is an absolute necessity, but is very nice and helps when it comes to remembering server names. In order to “keep it simple” I decided to use BIND running on Ubuntu Server. The installation and configuration is easy when coupled with Webmin on Linux. DNS is also easy to run on Windows but to me, Windows management and maintenance is a little burdensome and the Windows footprint is somewhat bigger. Here is a quick install guide to get you going in your home lab.

I run my DNS server on an Unbuntu 16.04 Server virtual machine from my QNAP TS-451+ NAS via QKVM (Virtualization Station). The TS-451+ can run a few virtual machines directly.

  1. Create VM shell – For my DNS server I configure it with 1 vCPU, 768MB of RAM, and 20GB of disk.
  2. Download the Ubuntu 16.04 Server (64-bit) ISO file – https://www.ubuntu.com.
  3. Attach the Ubuntu Server installer iso that was just downloaded to the VM shell boot the VM from it.
  4. Install Ubuntu 16.04 Server:
    • Select “Install Ubuntu Server”
    • Select a language and press “Enter”
    • Select your local
    • Chose to have your keyboard detected or chose from a list, I opt to chose from a list so selected “No”
    • Enter in the hostname and “Continue”
    • Type in the name of the non-admin account and “Continue”
    • Verify the username of the account and “Continue”
    • Verify the username of the account and “Continue”
    • Re-enter the password to verify and “Continue”
    • Chose if you want to encrypt your home directory.
    • Verify the auto-selected timezone.
    • Select how you would like to partition the disk, I chose “Guided partitioning”.
    • When done partitioning “Finsh and write changes to disk”.
    • Type in your HTTP proxy for the package manager if needed.
    • Chose how updates/upgrades are managed.
    • Select the software packages to pre-install and “Continue”. I usually chose to install OpenSSH server along with the “standard system utilities”
    • Install GRUB.
    • Finish the installation and reboot.
  5. The base install will usually need a number of system updates.
    Logon as the user you created during the Server installation and run

    sudo apt upgrade

  6. Install Bind9 (and accompanying packages)

    sudo apt-get install bind9 bind9utils bind9-doc dnsutils

  7. Install and configure Webmin (Reference: https://doxfer.webmin.com/Webmin/Installation)

    sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list'

    wget -qO - http://www.webmin.com/jcameron-key.asc | sudo apt-key add -

    sudo apt-get update

    sudo apt-get install webmin

  8. Connect to the Webmin portal with a web browser to set a static IP and configure BIND

    https://server_ip_addr:10000

    • Click “Networking” -> “Network Configuration”
    • Click “Host Address” – Replace 127.0.1.1 with whatever static IP address that you’ll use for your server, Save configuration.
    • Click “Hostname and DNS Client”, enter in the IP address of your server as the primary DNS server, add search domain, Save configuration.
    • Click “Routing and Gateways”, put in your router IP address for the Gateway, Save configuration.
    • Click “Network Interfaces” and click the name of the network interface, Set the static IP, Netmask, Broadcast, Save configuration.
    • Put a check mark next to the network interface and Click “Apply Selected Interfaces”.
    • Wait 30 seconds and reconnect to the Webmin portal with the updated IP address.
  9. Basic Configuration of BIND
    • Click “Servers” -> “BIND DNS Server”
    • Click “Forwarding and Transfers”
    • Put in your ISP, or other Internet DNS server IP addresses and click “Save”
    • Click on “Apply configuration” or “Stop/Start” the DNS server in the upper right corner
  10. At this point you should create your master forward and reverse zones
  11. Have fun!
Posted in Home Lab, Linux and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *