dnsmasq 解決ubuntu訪問網面慢的問題

下載dnsmasq 

http://www.thekelleys.org.uk/dnsmasq/

解壓dnsmasq

進入dnsmasq目錄

閱讀setup.html,參照安裝方法:

拷貝dnsmasq目錄下的dnsmasq.conf.example到/etc下並改名dnsmasq.conf

編輯dnsmasq的配置文件

命令: sudo gedit /etc/dnsmasq.conf

找到下面這一項

#resolv-file=

用下面的一條語句替換

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

確保你沒有更改過/etc/resolv.conf文件,如果改過,恢復原狀

然後執行命令

sudo cp /etc/resolv.conf /etc/resolv.dnsmasq.conf

然後編輯resolv.conf

命令;sudo gedit /etc/resolv.conf

將其中的域名服務器全部去掉,加入以下這行

nameserver 127.0.0.1

保存,退出,重啓系統


發佈了4 篇原創文章 · 獲贊 44 · 訪問量 68萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章