Ubuntu uses DNS cache to speed up Internet access

Source: Internet
Author: User
Install dnsmasq In Ubuntu. Run the following command: sudoapt-getinstalldnsmasq to edit the configuration file of dnsmasq: sudogedit/etc/dnsmasq. conf: # resolv-file = replace it with the following statement: resolv-file =/etc/resolv. dnsmasq. conf and then execute the command to/etc/resolv

Run the following command to install dnsmasq in Ubuntu:

Sudo apt-get install dnsmasq

Edit the configuration file of dnsmasq with the following command:

Sudo gedit/etc/dnsmasq. conf

Find the following item:

# Resolv-file =

Replace the following statement:

Resolv-file =/etc/resolv. dnsmasq. conf

Then run the command to create resolv. dnsmasq. conf with a copy of/etc/resolv. conf:

Sudo cp/etc/resolv. conf/etc/resolv. dnsmasq. conf

Edit resolv. conf and run the following command:

Sudo gedit/etc/resolv. conf

Comment out all the domain name servers and add the following lines

Nameserver 127.0.0.1

Save and exit. Run the following command:

Sudo gedit/etc/ppp/peers/wvdial

Add # Before usepeerdns, that is, overwrite this statement. Prevent resolv. conf from being overwritten by pppoe.

Restart.

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.