Mint 13 Fix for Broken DNS.

I really love Mint, just let me get that out of that way first. That being said, there are usually a couple things I catch, per release, that filter down from Ubuntu, that I wish were taken care of before Mint hits my desktop.

This time it is DNS.

I installed Mint 13 and was cruising around my home network and noticed that my dns searches weren’t appending my local domain. I had to use the FQDN to get to *anything* on my home network. Well, this frustrated me a bit because I worked hard to set up my own home network, I have resources on it including DNS, and I would like to actually use it. So, I went on the hunt for WHY I had to use a fully qualified domain name on my network…

For some strange reason, someone, somewhere thought it would be a great idea to mess with the way we handle DNS. In fact, the way Linux/Unix/unix has traditionally handled DNS for ever. That being if you put stuff ™ in the friggin /etc/resolv.conf file, your DNS just magically works. Well, not any more.

I have done 3 Mint 13 / Cinnamon installs now (assuming that Mate is the same here) and, in fact, THERE IS NO RESOLV.CONF file! What has happened is this, as far as I can tell. Someone in the Ubuntu camp (I assume) decided that it would be a great idea to start using dnsmasq through the NetworkManager to take care of DNS because they wanted to skirt some VPN issues with single homing. In layman’s terms, when you use a VPN, you are *ONLY* supposed to be able to connect to that network to be secure. Using dnsmasq, you could conceivably be on your VPN and route local traffic around too (multi homing). IPSEC guys frost themselves over stuff like this, BTW.

So, I set about to correct this injustice. Here is a simple script you can run which will turn off the dnsmasq garbage, put your resolv.conf files back in place where they belong and start those services back up so stuff works like we have been doing it for 20+ years.

#!/bin/bash

clear

# Test for UID=0
if [ "$(echo $UID)" != "0" ]
then
echo “You must be superuser to run this program. Try ‘sudo ./fixmint13.sh’”
exit
fi

sed -i -e 's/dns=dnsmasq/#dns=dnsmasq/g' /etc/NetworkManager/NetworkManager.conf

ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
resolvconf --create-runtime-directories
resolvconf --enable-updates

reboot

Be Sociable, Share!

4 Responses to “Mint 13 Fix for Broken DNS.”

  1. dwasifar Says:

    I was frustrated when dnsmasq showed up on Mint 13’s Network Manager configuration too. It didn’t cause me the same problems you had, because of how I have my network’s local caching DNS server set up; but it seemed redundant for the client to be caching already-cached results from the local caching server, and it made it difficult to see what was actually going on with the caching server when doing host -v foobar.com from a Mint 13 client.

    I never bothered to fix it on the one machine I was running it on, but now I’m running Mint 14 on my laptop and your handy how-to came to my attention by accident just at the right time. Saved me some poking around in the resolvconf docs. Thanks 🙂

  2. abennett0535 Says:

    I need assistance in what this syntax means. I need to be able to apply this the correct way, however, I am unable to do so in Terminal. Do I write a batch file in Pluma or how do I apply this the correct way in Terminal? Any help is much appreciated. Please email me the proper way to apply this fix as my resolve.conf file is not resolving DNS on my Linux Mint Maya 13 64-bit ASUS system. I have recently been having this problem the last few months and finally found this page. Thank you for your hard work and thank you in advance for your assistance with this. 🙂

  3. linc Says:

    Put all that in a terminal after you are logged in as root (sudo su -)

  4. linley Says:

    you rock!!!
    saved my install

Leave a Reply

You must be logged in to post a comment.