Speed up Debian/Crunchbang dns name resolution: Faster Internet

This is just a little tip for those who don’t know about it yet. You may find that your internet connection is a bit slow, or your browser takes a while to connect to certain websites. Well this little bit of editing will provide you with a noticeable difference in speed when browsing the internet.

The problem lies in /etc/nsswitch.conf, so we just edit one line:
Comment out the “hosts:” line, and a new line minus “mdns4_minimal [NOTFOUND=return]” and “mdns4”, so that it only reads “files” and “dns”. [see below]

————————————————————————–
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference’ and `info’ packages installed, try:
# `info libc “Name Service Switch”‘ for information about this file.

passwd: compat
group: compat
shadow: compat

#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
—————————————————————————-

*Note* It’s always good practice to comment out and rewrite any changes you make on any system file, just in case you need to revert back to the default settings for any reason.

Advertisements

7 thoughts on “Speed up Debian/Crunchbang dns name resolution: Faster Internet

  1. I'm glad I paid your bog a visit this morning. Nice one 🙂

    Do you mind if I reproduce this at omnsproject for my own reference?

  2. Hi omns, yeah some hosts can be funny with dbase connections, either localhost or something more specific like localhost:/tmp/mysql5.sock. You may even have to enable remote connections for a specific database. I've also had to create a different user for some sites as well. Let me know how you get on.
    I had some fun and games with Whird as I have it in a subdir, and I had to play with the htaccess, but now it's setup, I really like it. Just need to find time to post something 🙂

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s