Last Updated: February 25, 2016
· aalvarado

Enable wildcard subdomain for localhost on Ubuntu/Mint

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 



change dnsmasq.conf

# /etc/dnsmasq.conf

Add your local dns nameserver to your interface.,,

It can be done on the Network manager interface like in this link:

Or with a text editor:

# /etc/network/interfaces
iface eth0 inet static

restart Network manager

sudo service network-manager restart

Or the interface from the command line:

ifdown eth0
ifup eth0

start dnsmasq:

sudo service dnsmasq start

Check that you can ping any subdomain:


You should be able to get responses from both

2 Responses
Add your response

Thanks for your article!

Can you please add steps for Add your local dns nameserver to your interface

Here is a link for those who can face trouble

over 1 year ago ·

Added, thanks anup27.

over 1 year ago ·