Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Ubuntu 12.04 /etc/resolv.conf implementation with dnsmasq

On the current version of Ubuntu (12.04), you might notice that the current /etc/resolv.conf file always record a nameserver which then resolv dns via dnsmasq, but most of the time after test few things, I found it more problematic. It always disregard my local DNS server, and goes directly to the DNS of my ISP.

If you’re having the same problem like mine, here’s a quickfix:

1. Modify the configuration /etc/NetworkManager/NetworkManager.conf

$> sudo gedit /etc/NetworkManager/NetworkManager.conf

2.  Comment the line that contain “dns=dnsmasq


3. Then restart the network-manager

$> sudo  service network-manager restart

4. Done




6 responses to “Ubuntu 12.04 /etc/resolv.conf implementation with dnsmasq

  1. Cory Marshall (@Cory_Marshall) July 7, 2012 at 6:02 am

    I had a hard time trying to figure out why OpenDNS was not working on my laptop (Ubuntu 12.04). I have my router set up with DHCP to use OpenDNS servers. I was able to find out dnsmasq was the issue and now all is right with the world again. Thanks for the tip.

  2. Phil-0.1 July 9, 2012 at 11:53 pm

    Thank you, I was just shouting on this! What the point to use DNSMASQ on a workstation, damn!

  3. kwilium | EDV-Dienstleistungen July 17, 2012 at 11:07 pm

    Many many thanks for the simple and effective hint! It’s so great to have a working DNS resolution again :-)……

  4. Andrew Edelstein August 10, 2012 at 10:15 pm

    THANK YOU! This was driving me crazy. it got to the point where I had a backup of a resolv.conf with the proper DNS servers that I had to manually copy over the active resolv.conf to get anything to work. Having to do this was a pain. I could not figure out why, for the life of me, they broke something so basic, so badly.

  5. Doccpu December 1, 2012 at 4:00 pm

    Ubuntu broke it all right. after a week of looking why dns-nameservers didnt work i found that supposedly resolv.conf could be edited or changed by at least 5 different programs or “features” that ubuntu could or would or may have or might have installed to make life simpler. BULL. it worked leave it alone. I still dont know how or why something edits my resolv.conf but i edited it the way i wanted and made it read only to EVERYBODY. works fine now.

  6. Pingback: Taking DNS to Synology Diskstation « Salman Zari Ghanvi's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: