How to Install dnsmasq caching DNS server in Ubuntu

As you may have noticed in recent days, my domain registrar (HostFast) suspended cnx-software.com domain for what I believe are dubious reasons, meaning the site was inaccessible to the outside world and myself. I cannot do much about the latter and I’m held hostage to what the domain registrar’s will, but I was able to access my own website with my domain name after installing a DNS server through dnsmasq on my Ubuntu 20.04 laptop.

Edit: most of the steps below are actually not needed in Ubuntu 20.04, since you could just edit /etc/hosts (step 4). I’ll just leave the instructions below in case somebody needs to install dnsmasq.

Here are the steps I followed.

  1. Install dnsmasq
  2. This did not work at first since systemd-resolved is already installed, so I disabled it by following instructions on askubuntu:
  3. I then added name servers to /etc/dnsmasq.conf:
  4. and cnx-software.com IP address to /etc/hosts:
  5. The final step was to restart dnsmasq:

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

cnx-software.com DNS server dnsmasq

With some websites, you could just type of IP address in the web browser, but since CNX Software is relying on WordPress, the domain name lookup needs to work for the website to render properly. At least now, I can write articles (and talk to myself!), which is a massive improvement, as I was not able to access my own website previously.

DNS is a centralized system which means anybody is at the mercy of higher powers, bad actors, and so on. I feel it is not ideal, but there’s no proper alternative to DNS right now, and becoming your own domain registrar is challenging and/or costly…

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
23 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications