generic .dev or .test address for localhost in linux mint with DNS masq

localhost.test generic localhost dnsmasq

I was looking up instructions on the web how to configure my DNS Masq so that I have a generic .test domain but was struggling to find the correct configuration file.

First some info about DNS Masq on linux mint 18.3

  • DNS Masq is preinstalled.
  • It's a dependency of the network-manager.
  • I found the configuration location with the command ps ax | grep dnsmasq
  • That appeared to be: /etc/NetworkManager/dnsmasq.d/
  • So it's not a configuration file (as told in most instructioins I found) but a configuration directory.
  • You just need one line in the configuration file and no separate resolver file.

So how does it work?

  • In /etc/NetworkManager/dnsmasq.d/ create a new file.
  • The name of this file should be the name of your extension, so in my case: test.
  • sudo touch test
  • In that file you only need one line of configuration
  • address=/test/
  • Restart: sudo service network-manager restart
  • Test: ping somethingrandom.test