Linux Mint: localdomain settings using DNSMasq

If you are developing websites on Linux Mint, then you might want to set a DNS Wildcard so that anything on localdomain (*.localdomain) resolves to your machine (i.e. test.localdomain, anything.localdomain). First of all, you need to install dnsmasq “a lightweight, easy to configure DNS forwarder and DHCP server”, this can be simply done using:

sudo apt-get install dnsmasq
sudo vim /etc/dnsmasq.d/localdomain.conf
sudo service dnsmasq restart

This will tell DNSMasq to setup a wildcard for everything on “” to point to and to listen for DNS requests on You now just need to change your DNS servers in network manager. On the Linux Mint task bar, right click on the network icon and select “Edit connections” and edit the connection you are using. Select “IPv4 Settings”. If you have “Automatic (DHCP)” selected, change it to “Automatic (DHCP Addresses only)”. Then add the DNS server and others of your choosing (such as the Google and ones). All should now be working!

Leave a Reply