Speed up web browsing in Firefox/Opera using Local DNS

This post was written by admin on November 10, 2009
Posted Under: Internet,Mozilla Firefox

This tutorial shows how to install and configure local DNS in Ubuntu,and make your Firefox/Opera web browser runs faster.
Install dnsmasq
OpenĀ  a terminal window(Applications/Accessories/Terminal) and type this to install dnsmasq:

sudo apt-get install dnsmasq

Configure dnsmasq
1. Edit /etc/dnsmasq.conf:

sudo gedit /etc/dnsmasq.conf

Find the line “#listen-address=” (without quotes),delete the “#” and change it to:

listen-address=127.0.0.1

Find the line “# resolv-file=”(use Search->Find,type to search),replace this with:

resolv-file=/etc/resolvconf/update.d/dnsmasq

then run:

sudo cp /etc/resolv.conf /etc/resolv.dnsmasq.conf

2.Edit /etc/dhcp3/dhclient.conf:

sudo gedit /etc/dhcp3/dhclient.conf

Find this line “#prepend domain-name-servers 127.0.0.1;”,and delete the “#”.
3.Edit /etc/resolv.conf:

sudo gedit /etc/resolv.conf

add following as the first line:

nameserver 127.0.0.1

4.Edit dsl-provider:

sudo gedit /etc/ppp/peers/dsl-provider

if there’s no this file(content is blank),use this:

sudo gedit /etc/ppp/peers/provider

add “#” (without quotes) at the beginning of:

usepeerdns

Test:
First,restart dnsmasq:

sudo /etc/init.d/dnsmasq restart

Try this twice and see effect:

dig g.cn

Configuring Firefox/Opera web browser

In Firefox or Opera window,go to Edit->Preferences,select Advanced->Network and click on Settings.
dns

Check “Manual proxy configuration:”->”No proxy for:localhost,127.0.0.1″.Click on OK
dns1

Related posts:

  1. Speed up Firefox by moving cache into RAM in Ubuntu
  2. Opera 11.60 ‘Tunny’ Released (Ubuntu Installation Included)
  3. How to Configure proxy settings for Opera/Firefox web browser
  4. Ubuntu Tip:Speed up Firefox by compacting SQLite databases
  5. Install Opera 10 Web Browser in Ubuntu Linux

    Tags:

    Reader Comments

    There is a bug in Lucid server edition
    some one who tries this on Lucid (ubuntu 10.04 ) is in problem read here
    https://bugs.launchpad.net/ubuntu/+source/dnsproxy/+bug/567008?comments=all
    the above method will not work on latest version.

    [Reply]

    #1 
    Written By Tapas Mishra on February 10th, 2011 @ 11:59 am

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address