How to solve the slow way of Ubuntu Internet

Source: Internet
Author: User

Using Firefox and other browsers to surf the internet in Ubuntu is much slower than surfing the Internet in Windows, but careful people will find that the slow time is spent on DNS lookups. Then we can cache DNS in the native computer, that is, a DNS proxy server is set up natively. Commonly used software is bind, Djbdns, DNSMASQ and PDNSD. Let us say, with PDNSD to set up a permanent DNS proxy server, so-called "permanent", that is, after the system restart, the native cache DNS still exist, no longer to find the real DNS to re-establish the cache.

1. Installation

sudo apt-get install PDNSD

When installing, it will ask you what configuration you choose, please select "Manual".

2, Configuration PDNSD

sudo gedit/etc/pdnsd.conf

Modify

server {

Label= "resolvconf";

}

For

server {

Label= "OpenDNS";

ip=208.67.222.222;

ip=208.67.220.220;

timeout=30;

interval=30;

uptest=ping;

ping_timeout=50;

Purge_cache=off;

}

Label= "OpenDNS";

where "OpenDNS" can be casually written, a logo, for future diagnosis;

ip=208.67.222.222;

ip=208.67.220.220;

These two lines can also be written as a line of ip=208.67.222.222,208.67.220.220, representing the real DNS server address, can have multiple.

The following parameters are used by default.

sudo gedit/etc/default/pdnsd

Modify the value of Start_daemon to Yes.

3. Add the DNS proxy server to resolver

sudo gedit/etc/resolv.conf

Add a sentence on the first line: nameserver 127.0.0.1

4. Prevent resolv.conf from being covered

If you have DHCP service enabled,

sudo gedit/etc/dhcp3/dhclient.conf

Remove

#prepend domain-name-servers 127.0.0.1;

The "#" in front.

If you are dialing the Internet, then

sudo gedit/etc/ppp/peers/provider

Add # to the front of the Usepeerdns, which is to comment out the statement. Prevent resolv.conf settings from being overwritten by PPPoE.

5. Start PDNSD

SUDO/ETC/INIT.D/PDNSD start

6. Testing

Dig www.baidu.com | grep time

The results showed:;; Query Time:1 msec

The original result:;; Query time:845 msec

How to solve the slow way of Ubuntu Internet

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.