Setting dnsmasq for wildcard domains in ubuntu

17 Dec 2015 in Development, DNS, Linux

This is useful for development environments like vagrant and docker, where you can play with FQDN instead of IP:

# edit according to your needs

# append to configuration file
sudo echo "address=/$DOMAIN/$IP" > /etc/NetworkManager/dnsmasq.d/dev.conf

# restart network manager
sudo stop network-manager
sudo start network-manager

The above will resolve the *.dev domain on IP

Note that this is the version bundled with network manager and not the dnsmasq package.