Use dnsmasq as the dns proxy cache server

Source: Internet
Author: User
When it comes to dns, you will always think of bind. Although bind is powerful, it is too complicated and it is a headache for configuration. Killing a chicken with a knife is not a zombie, but a fear that the knife will hurt your feet. Dnsmasq is much easier to use than the dns ancestor bind. It can be used as a forward dns proxy or an internal pure dns server. Install apt-g in debianubuntu

When it comes to dns, you will always think of bind. Although bind is powerful, it is too complicated and it is a headache for configuration. Killing a chicken with a knife is not a zombie, but a fear that the knife will hurt your feet. Dnsmasq is much easier to use than the dns ancestor bind. It can be used as a forward dns proxy or an internal pure dns server.

Install In debian/ubuntu
Apt-get install dnsmasq

Configuration
Vi/etc/dnsmasq. conf
Under the default configuration, dnsmasq uses the system's/etc/resolv. conf and reads/etc/hosts. You can change or disable it in the configuration. Now you have modified the two,
Other Default values:
Resolv-File=/Etc/dnsmasq. resolv. conf
ADdN-hosts =/etc/dnsmasq. hosts

(Dnsmasq also supports dhCpService, but generally do not need to handle it)

Dnsmasq can use the hosts file to set the Domain Name:
Example: test.SuDone.com is a non-existent domain name. I point to an ip address in dnsmasq:
Echo 64.233.189.99 test.sudone.com>/etc/dnsmasq. hosts
Restart after modification
/Etc/init. d/dnsmasq restart

After that, you only need to point the local dns to the dnsmasq machine.PingTo test.sudone.com.

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.