apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Technology / Guides / Solving Debian 8 Jessie resolv.conf update issues

Solving Debian 8 Jessie resolv.conf update issues

2015/06/18 by sudo

With Debian Jessie, resolv.conf, which stores the name servers for the computer to use when looking up DNS requests, seems to automatically reset every so often. This results in the DNS lookup time for each request sent through the proxy to take longer if the name servers listed are not accurate or fast. For example, my resolv.conf file contained the following by default:

/etc/resolve.conf
Shell
1
nameserver 192.168.0.1

The IP address listed is that of the router, which for some reason was taking an age to actually respond to requests. Originally I tried to edit this file by hand but it kept clearing itself back to default. This seems to be a particular issue in Debian Jessie.

To resolve the problem, I installed resolvconf, which is a program which has been designed to update the systems information about name servers.

install resolvconf
Shell
1
apt-get install resolvconf

Once installed it’s easy enough to add the new name servers to the configuration file. I chose Google’s as a test, since they’re likely to be fast.

edit resolvconf head file
Shell
1
nano /etc/resolvconf/resolv.conf.d/head

In the file I added the two IP v4 name servers for google so that it looked like this:

/etc/resolvconf/resolv.conf.d/head
1
2
3
4
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4

Now that is in there, and of course you can change the name servers as you see fit, it’s just a case of running the update to resolvconf

update resolvconf
Shell
1
resolvconf -u

Now your /etc/resolv.conf file should have your two lines prepended to it. Since the file works in top down priority your new requests will be sent to 8.8.8.8 by default. After implementing this Squid increased in speed significantly.

 

You may also be interested in reading alternative solutions on this particular thread at unix.stackexchagne.com.

 

 

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Tumblr
  • Pinterest

Related

Filed Under: Guides, Linux Tagged With: debian, debian jessie, nameservers, resolv.conf

Recent Posts

  • Fixing Error Opening Spice Console SpiceClientGtk missing
  • Resetting a UniFi controller password
  • Optimising Nginx for PHP & WordPress (Time To First Byte)
  • Backing up email using offlineimap
  • Setup Fail2ban for NextCloud

Tags

7z 7zip API auditing BBC Courier MTA crochet data recovery debian debudding development Dingo API email Getting started with Laravel 5 & Dingo API hard drive health internet radio KVM Laravel larvel 5 lenovo Linux Mail Quota Minion mint netgear nas networking network shares php Postfix proxy server samba security SMART smartctl smartmontools smb smbfs testing ubuntu ubuntu 18.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life