本地的DNS服务器不是很稳定,正好看到这篇文章。
首先安装:
$sudo apt-get install dnsmasq
然后编辑/etc/dnsmasq.conf
修改为:
listen-address=127.0.0.1
编辑/etc/dhcp3/dhclient.conf
修改为:
#supersede domain-name “fugue.com home.vix.com”;
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;
编辑/etc/resolv.conf:
search westgis.ac.cn
nameserver 127.0.0.1
nameserver 210.77.69.1
nameserver 210.77.68.240
nameserver 210.77.69.2
重启服务:
$sudo /etc/init.d/dnsmasq restart
测试,执行两次就能看出查询时间的差异了:
$dig google.com
发表回复