Can I set up my own DNS server on a Windows 10 machine?

Solution 1:

It is possible, DNS is just a (relatively) simple TCP&UDP-based service – but there are really few DNS servers that are made to run on Windows; it's simply not a popular platform for DNS hosting, outside from MS Active Directory environments.

  • The previously mentioned MaraDNS runs on Windows.

  • Microsoft DNS Server – but it's only available in Windows Server (which you could run via Hyper-V, as Microsoft provides a free 180-day trial), not in the "consumer" versions of Windows.

  • …That's about it? (ISC BIND 9 used to be available for Windows, but no longer is. They now suggest running the Linux version through WSL instead.)

As you already have a Linux VM on Hyper-V, you should run the DNS server on that instead. (A few common DNS servers for Linux are BIND 9, PowerDNS, Knot, NSD.)

Note that you're specifically looking for software made to work as an authoritative DNS server. There are also some DNS servers which are meant to run as resolvers (aka caches/proxies) and can't actually host a domain; e.g. dnsmasq or Unbound are not really suitable.