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:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

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

ROCK 5 ITX RK3588 mini-ITX motherboard

23 Replies to “How to Install dnsmasq caching DNS server in Ubuntu”

  1. Ehm …
    Couldn’t you just have added this line to the /etc/hosts file …
    96.126.96.41    www.cnx-software.com
    … ?
    (that’s what I do)

    1. It doesn’t look like it’s possible (seems to me like they’ve blocked domain transfers).

      1. Yes, but you should have a gui somewhere to unlock the transfer block. GoDaddy has pages describing the howto for various registrars. I had the issue with register.com in the past, this registrar from hell hid the option deep in their pages…

  2. Note: I’m using OpenDNS and the propagation took a while before the domain was pointed to the ‘suspended server’. This is why I could write a comment early on and also grab the IP-address and place in my own hosts file (until the domain is no longer suspended).

    I’ve attempted to set up cnx-software.multitrading.dk
    -This will likely not work for several reasons:
    1: The server is probably name-based, so nginx wouldn’t recognize the domain.
    2: The certificate will not be valid (Jean Luc can use a self-signed certificate, though).
    Jean Luc can of course modify the server to accept the above domain as a temporary solution.

    … However, it’ll still allow you to remember the above subdomain and domain, so you can make a nslookup and place it in your hosts file. It’s easier to copy and paste the IP address directly, though.

    1. Actually cnx-software.multitrading.dk seem to work; though the content seem a little different (I don’t see this dnsmasq page).
      -So you should be able to go to the above mentioned subdomain+domain until the original domain is available again. =)

        1. and no comments.

          … Which means it’s much better to use cnx-maker.net =)

          (Though my quick solution isn’t necessary any longer, I don’t see any reason to take it down until the original domain is up again).

  3. Jean-Luc, I’d like to contact you offline but I can’t since your mail address is on your domain. I’m seeing simple solutions on how to help you but discussing them publicly would defeat them, so please contact me privately then you can delete my message 🙂

  4. it seems it works now – is it solved ?
    anyway I recommend transferring your domain to njal.la – it was created by one of the tpb founders to resist censorship and abuse – the things you were subjected to for the past week

        1. Thanks. I’ve read it but I’m a bit confused.

          We’re not actually a domain name registration service, we’re a customer to these. We sit in between the domain name registration service and you, acting as a privacy shield.

          When you purchase a domain name through Njalla, we own it for you. However, the agreement between us grants you full usage rights to the domain. Whenever you want to, you can transfer the ownership to yourself or some other party.

          So they purchase the domain from an ICANN accredited registrar. If the registrar decides to take a domain down, there’s nothing they can do, but they might help resolve the issue faster.

          I think the main advantage of Njalla is anonymity, but it’s not something I need for CNX Software domain.

          1. they wanted to become a registrar but got denied because of political/activism history. anyway as I’ve read below it wasn’t really a censorship issue so njal.la is not necessarily the silver bullet for your kind of issue.
            Anyway I’m very glad it’s solved – you’re my main technology blog !

  5. Can you share a bit about what those dubious reasons were? Might be useful for others out there experiencing the same in the future.

    1. I’ll write a post about it soon. I made various mistakes over a 12-year period that enabled the problem to happen.

      Now I still can’t modify the WHOIS contact details to “default profile contact info”, and a few days ago, somebody in chat told me I would be fined $50 for “abuse”. Once those two points get clarified/solved, I’ll write about the issue I got. HostFast has 24/7 support, but the guys in chat can’t do anything and just tell people to open a ticket, and things take forever to get resolved.

    1. About 75% reduction in traffic during the downtime. The website mostly got mobile traffic from Google AMP cache, plus the few people who accessed the website using /etc/hosts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products