This HOWTO describes how to set up a Slackware Linux based BIND9 virtual DNS server. The background on why this HOWTO came to be is that I recently received a renewal notice for my domain vanlab.net. I haven’t used this domain for anything in nearly a year. Not wanting to pay for DNS hosting or use someone else’s DNS servers, the domain has as a result sat idle.
It occurred to me last night though hat anything this domain would ever be used for would run off my laptop. Since I’m the only one that would ever use it, it would be fine if it only was available when I was studying. Therefore I decided that it would be feasible to host my own "part time" DNS server.
I opted not to use any flavor of Windows for three reasons: First, I wanted as small a footprint as possible as this is a VM that will be running on my laptop all the time. Second, Windows officially requires a license. (In my mind, this is a "production" implementation so I wanted to find something legal). Third, I’ve always wanted to see if I could make a useful Linux server and I finally came up with a use case.
What follows is how I’ve managed to successfully get my laptop to run a virtual machine that can resolve external DNS queries for vanlab.net.
- We will be using SMS or Superb Mini Server (http://sms.it-ccs.com) as our Linux distribution of choice. After much trial and error with multiple distros, I found this one the best as it includes a tool called Webmin that provides a graphical web based interface for configuring BIND
- (There is a wiki page for configuring this server at http://sms.it-ccs.com/wiki/)
- Download the SMS64.Live.CD-2.0.5.iso file. Note: We are downloading the live CD and will install to the HD rather than the full installation despite the recommendation by the distro. I tried to install the full version but couldn’t get it to boot. It also includes almost 3GB of packages, almost none of which I needed for this project anyway
- My domain is registered with dyndns.org. I first needed to configure the name servers for the domain. I logged into the management interface at https://account.dyn.org
and went to / My Zones Domains / Domain Registration / Edit Name Servers
- I added two entries (as a minimum of two are required) for ns1.vanlab.net and ns2.vanlab.net. I then created two glue records by the same name and pointed both of those IPs at my Shaw public IP of 188.8.131.52. (An IP that hasn’t changed in 2 years so it’s nearly public anyway)