Since 12.04 NetworkManager needs dnsmasq-base as a dependency,
If dnsmasq is installed ie
apt-get install dnsmasq it will try to bind to port 53 which is already in use because of NetworkManager.
To resolve first comment the dnsmasq line from networkmanager.
# /etc/NetworkManager/NetworkManager.conf [main] plugins=ifupdown,keyfile #dns=dnsmasq [ifupdown] managed=false
# /etc/dnsmasq.conf address=/mydomain.dev/127.0.0.1
Add your local dns nameserver to your interface.
127.0.0.1, 220.127.116.11, 18.104.22.168
It can be done on the Network manager interface like in this link: http://askubuntu.com/questions/143819/how-do-i-configure-my-static-dns-in-interfaces
Or with a text editor:
# /etc/network/interfaces iface eth0 inet static [...] dns-nameservers 127.0.0.1 22.214.171.124 126.96.36.199
restart Network manager
sudo service network-manager restart
Or the interface from the command line:
ifdown eth0 ifup eth0
sudo service dnsmasq start
Check that you can ping any subdomain:
ping foo.mydomain.dev ping bar.mydomain.dev
You should be able to get responses from both