By Dnsmasq self clean DNS service

I do not know to sprinkle with some of the time public DNS services online, always inexplicable Some sites can not be resolved, sometimes 114 can resolve, Ali Tencent DNS DNS does not work or does not work, leading to always switch back and forth DNS, it is a worry.

So to think of their own to build a DNS service will not be better? Online search, it seems very complicated way, has no hands, but the next test today, found surprisingly simple, experience a lot, feel good effect.

First, you need to have a VPS, quality not good, I'm perfectly mounted on top of my VPS American 64M memory, 32M memory should be looked at is also possible.

If you resolved relatively high speed, it is recommended that a VPS Asia, and even domestic VPS transfer is also possible, but the cost is slightly higher point, according to their own needs or DIY it.

Installation Dnsmasq

yum install dnsmasq -y 
service dnsmasq start 

Configuration Dnsmasq

Dnsmasq profile is /etc/dnsmasq.conf, edited into a format as follows:

By Dnsmasq self clean DNS Service-1

One thing to note is, check the front of the no-hosts are not already the # sign is there by default, dnsmasq will first look for local hosts file to go looking for cached domain name, and finally go looking upstream dns server .

General set up DNS service, you can allow all users to use your DNS service that listen-address default commented out, if you do not want all users to use your DNS service, you can add specific IP address behind the listen-address ,Such as:

listen-address=listen-address=192.168.1.123,127.0.0.1

DNS servers modified upstream Dnsmasq

Edit /etc/resolv.conf, refer to the following:

nameserver 8.8.8.8 nameserver 4.4.4.4

Start Dnsmasq and add startup items

chkconfig dnsmasq on
/etc/init.d/dnsmasq restart

Execution   Can you view Dnsmasq have a normal startnetstat -tunlp|grep 53

The rest is to modify your local DNS on it.

I put up a good DNS

63.223.104.179 (United States)

For testing purposes only, does not guarantee permanently available

Original link: , please indicate the source forwarding outdated old owners!

Guess you like

Origin www.cnblogs.com/hacvk/p/12421884.html