Home > Debian, Free Software, God Damnit Linux, Jon F > Resolving the DNS Issue Once and For All

Resolving the DNS Issue Once and For All

A little while ago, I wrote about problems that I was having with my laptop not resolving DNS requests. After I restarted today (because X11 crashed, but that’s a whole other can of worms), it started happening again, even though I had fixed the problem once before. Turns out that the big warning banner at the top of the resolv.conf file was relevant, and that my changes were eventually lost, just not on the first reboot.

So I moved back to my Windows machine for a few minutes to hit up the #debian IRC channel, where I explained my issue and what I had done to solve it last time. Luckily, somebody there presented me with a new solution to the issue that should persist restarts. Instead of making edits directly to resolv.conf, I was instructed to add a prepend line to the /etc/dhcp3/dhclient.conf file:

#add a prepend line to fix DNS issues
prepend domain-name-servers 64.71.255.202;

Where the IP address is the IP of your DNS server (OpenDNS, in my case). After saving the file, I ran

/etc/init.d/resolvconf restart

to apply the changes and restart the DNS lookup service thinger. I know that doesn’t sound very technical, but I honestly don’t know anything about the part of the network stack in Debian is responsible for DNS lookups, aside from the fact that it may or may not be called resolvconf, so you’ll have to live with it.

In any case, this seems to have worked quite well, so check into it if you’re having problems resolving DNS addresses on your machine.

  1. Jake B
    October 2nd, 2009 at 16:06 | #1

    First of all, “thinger”? What the hell, man.

    Second… the server you pointed to is actually the Rogers alternate DNS (so that the stupid search assistant doesn’t take over NXDOMAIN responses.) I just changed it in the router since we were having connectivity issues with OpenDNS this afternoon. For reference (or if you want to use OpenDNS on your own system) their servers are 208.67.220.220 and 208.67.222.222.

  2. Jon F
    October 2nd, 2009 at 16:09 | #2

    Hmm, hopefully putting the Rogers one in the dhclient.conf file doesn’t ruin me when I try to access the tubes from a non-Rogers internet line. Better change that…

  3. Tyler B
    October 2nd, 2009 at 17:34 | #3

    Furthermore, I as well have been having occasional DNS errors when trying to hit up websites from the school network. What’s odd is this specifically affects http://www.fedoraproject.org

  1. No trackbacks yet.