一个人的安静

夜深人静,一个人的安静.

dns缓存服务器 dnsmasq

linux下可以自己建个dns缓存服务器加快上网速度。

1、安装dnsmasq:

sudo apt-get install dnsmasq

2、编辑dnsmasq的配置文件:

sudo vi /etc/dnsmasq.conf

#找到下面这一项
#resolv-file=

#用下面的一条语句替换
resolv-file=/etc/resolv.dnsmasq.conf

#确保你的/etc/resolv.conf文件配置正确的DNS。
sudo cp /etc/resolv.conf /etc/resolv.dnsmasq.conf

3、然后编辑resolv.conf

sudo vi /etc/resolv.conf

#将其中的域名服务器全部去掉,加入以下这行
nameserver 127.0.0.1

4、重新启动服务:

sudo /etc/init.d/dnsmasq restart

同时,你也可以把dns地址更改为opendns的设置,这样在速度,智能性,防钓鱼站点各个方面都有所提高.

opendns的地址是(修改/etc/resolve.dnsmasq.conf文件):
nameserver 208.67.222.222
nameserver 208.67.220.220

标签:

评论一下

使用新浪微博登陆

请注意:已启用评论审阅,可能会延误评论的发表。不要重复发表。

iPad Apps