How to Install dnsmasq Caching DNS Server in Ubuntu

As you may have noticed over the past few days, my domain registrar (HostFast) suspended the domain for what I believe to be questionable reasons, meaning the site was inaccessible to the outside world and to myself. I can’t do much about the latter and I’m hostage to the will of the domain registrar, but I was able to access my own website with my domain name after installing a DNS server via dnsmasq on my Ubuntu 20.04 laptop.

Edit: Most of the steps below are actually not necessary in Ubuntu 20.04, as you can simply edit /etc/hosts (step 4). I’ll just leave the instructions below in case anyone needs to install dnsmasq.

Here are the steps I followed.

  1. Install dnsmasq

  2. It didn’t work at first because systemd-resolved is already installed, so I disabled it by following instructions on askubuntu:

  3. I then added nameservers to /etc/dnsmasq.conf:

  4. and the IP address to /etc/hosts:

  5. The last step was to restart dnsmasq:

And… magic! I was able to access my own website again through my local DNS server.

With some websites, you can just type the IP address into the web browser, but since CNX Software relies on WordPress, the domain name search must work for the website to display correctly. At least now I can write articles (and talk to myself!), which is a huge improvement since I couldn’t access my own website before.

The DNS is a centralized system, which means anyone is at the mercy of higher powers, bad actors, etc. I think it’s not ideal, but there is no suitable alternative to DNS at the moment, and become your own domain registrar is difficult and/or expensive…

Support CNX software! Make a donation through PayPal Where cryptocurrencies, become a patron on Patreon, or buy exam samples

Previous What is Dynamic DNS and how does it work?
Next IPs refuse government sharing plan on ancestral domain