Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

Run your small DNS server with MaraDNS

Luca Dell'Oca, March 3, 2021March 3, 2021
For a new project I started last week I needed a DNS server in my home office. Usually, my router is my dns resolver, but it doesn’t allow to create authoritative zones.  Windows 10 running on my laptop doesn’t have a DNS server either, and I don’t have an hypervisor in my home office to build a virtual machine; and it wouldn’t even be useful to spend so much time doing it for then using the DNS just a couple of hours.
So, I looked around and I found this tiny cool project called MaraDNS, that was perfect for my use case.

My local DNS server

MaraDNS does just this: it allows you to run on the fly a DNS server that can host authoritative zones. However, the developers removed this option from the latest versions, and the last version that can act as an authoritative DNS server is here:
https://sourceforge.net/projects/maradns/files/MaraDNS/3.5.0004/
After unpacking the zip file, I edited the file mararc so that its content it’s like this:
ipv4_bind_addresses = "172.27.217.93"
timestamp_type = 2
random_seed_file = "secret.txt"
csv2 = {}
csv2["virtualtothecore.local."] = "db.virtualtothecore.local.txt"

 

172.27.217.93 is the IP address of my laptop, and the last two lines means 1-we want to run an authoritative zone, and 2-the zone name is virtualtothecore.local and its resource records are stored in that text file. Also note that the zone ends with a trailing dot; this is how officially the DNS system works, even if years of using browsers that add it but don’t show it, has made people forget about it.
Then, I created a new text file named db.virtualtothecore.local.txt, with this content:
virtualtothecore.local. 172.27.217.93 ~
vcsa.virtualtothecore.local. 172.27.217.30 ~
esx1.virtualtothecore.local. 172.27.217.151 ~

 

Here, I’ve registered all my new machines I needed to manage.
Ok, it’s all set. Time to start the service. In the folder there’s a bat file called run_maradns.bat, I double click on it to start the software:
The DNS server is running, and you may also get another confirmation by the fact that Windows Firewall will ask you to allow the service to communicate on your private network.
Then, I configured also my own laptop to use the new local DNS server, and I tested if the zone works correctly:
Yup, the zone is served correctly from my laptop.
Now, I can use the new dns in my project, and just stop the program when I don’t need it anymore.
By now you may have understood what I was doing. I was spinning up a new vCenter appliance in my new NUC server, that had disks ready to be used for a single-node VSAN cluster. This means that I had no existing datastore, so I could only spin up the vcsa using a dedicated option to build the vsan datastore at the same time. I could not deploy a DNS server VM on the NUC before I had VCSA up and running, but I was stuck at the beginning of VCSA deployment at its Stage 2 (with the message “starting vmware appliance configuration” and no progress at all) because of the lack of DNS to resolve vcsa itself and the underlying ESXi server.
A ugly Chicken&Egg situation, solved brilliantly thanks to MaraDNS:

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tech dnslocalmararuntinyTips

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy